Print “N NE E SE S SW W NW”Is my name official?Calculate the day number of the yearRandom Golf of the Day...
Proving that a Russian cryptographic standard is too structured
Razzle Dazzle simulator
NUL delimited variable
Is it safe to remove python 2.7.15rc1 from Ubuntu 18.04?
Flight compensation with agent
C++ logging library
As easy as Three, Two, One... How fast can you go from Five to Four?
How to destroy a galactic level civilization and still leave behind primitive survivors?
Can there be absolute velocity?
Can the removal of a duty-free sales trolley result in a measurable reduction in emissions?
What should I discuss with my DM prior to my first game?
Why do radiation hardened IC packages often have long leads?
How far would a landing Airbus A380 go until it stops with no brakes?
What is the reason for setting flaps 1 on the ground at high temperatures?
How do you play "tenth" chords on the guitar?
Why did Intel abandon unified CPU cache?
Extracting data from Plot
Do empty drive bays need to be filled?
What is the logic behind charging tax _in the form of money_ for owning property when the property does not produce money?
Does the Nuka-Cola bottler actually generate nuka cola?
Do you have to have figures when playing D&D?
How to befriend someone who doesn't like to talk?
How can I remove material from this wood beam?
How can powerful telekinesis avoid violating Newton's 3rd Law?
Print “N NE E SE S SW W NW”
Is my name official?Calculate the day number of the yearRandom Golf of the Day #7: A distinctly random characterDouble rotationLoading… ForeverMatch this random stringThe shortest distance between two points is a lineTuple addition in pointfreeAlmost a Columbo episodeKolmogorov Flexibility. A.K.A. Sale! $38%$ Off All Codegolf While Stocks Last!
$begingroup$
This seems almost trivial, but since after some effort I was not able to beat the literal solution in J, I thought it might make a decent challenge (though, to be clear, this is not a J-specific challenge).
Title says it all. You simply need to write a program, or function (taking no arguments) that returns or prints:
N NE E SE S SW W NW
You may use newlines in place of spaces.
A no-argument function returning an array of strings such as
['N', 'NE', 'E', 'SE', 'S', 'SW', 'W', 'NW']
is also acceptable.
The letters may be upper or lower case, but may not be mixed.
code-golf string kolmogorov-complexity
$endgroup$
add a comment |
$begingroup$
This seems almost trivial, but since after some effort I was not able to beat the literal solution in J, I thought it might make a decent challenge (though, to be clear, this is not a J-specific challenge).
Title says it all. You simply need to write a program, or function (taking no arguments) that returns or prints:
N NE E SE S SW W NW
You may use newlines in place of spaces.
A no-argument function returning an array of strings such as
['N', 'NE', 'E', 'SE', 'S', 'SW', 'W', 'NW']
is also acceptable.
The letters may be upper or lower case, but may not be mixed.
code-golf string kolmogorov-complexity
$endgroup$
$begingroup$
There's a reason snippets are banned by default. As is, someone can just submit"N NE E SE S SW W NW"
as a valid answer for most sttandard languages. Please consider removing that, since no-one has yet taken advantage of it
$endgroup$
– Jo King
1 hour ago
$begingroup$
Perhaps allowing them to be output in any order would be slightly more interesting
$endgroup$
– Jo King
1 hour ago
$begingroup$
@JoKing Sure, I'll remove that. Honestly, I didn't expect anyone to submit answers that used the full literal value -- that's not in the spirit of the question. As I state, it came up because I wasn't able to beat the literal in J, despite the string having regularity and structure of a sort. The whole point is to exploit that regularity to beat a literal answer. Bad on me for not being more explicit. Allowing them any order defeats that as well, so I don't want to make that change.
$endgroup$
– Jonah
23 mins ago
add a comment |
$begingroup$
This seems almost trivial, but since after some effort I was not able to beat the literal solution in J, I thought it might make a decent challenge (though, to be clear, this is not a J-specific challenge).
Title says it all. You simply need to write a program, or function (taking no arguments) that returns or prints:
N NE E SE S SW W NW
You may use newlines in place of spaces.
A no-argument function returning an array of strings such as
['N', 'NE', 'E', 'SE', 'S', 'SW', 'W', 'NW']
is also acceptable.
The letters may be upper or lower case, but may not be mixed.
code-golf string kolmogorov-complexity
$endgroup$
This seems almost trivial, but since after some effort I was not able to beat the literal solution in J, I thought it might make a decent challenge (though, to be clear, this is not a J-specific challenge).
Title says it all. You simply need to write a program, or function (taking no arguments) that returns or prints:
N NE E SE S SW W NW
You may use newlines in place of spaces.
A no-argument function returning an array of strings such as
['N', 'NE', 'E', 'SE', 'S', 'SW', 'W', 'NW']
is also acceptable.
The letters may be upper or lower case, but may not be mixed.
code-golf string kolmogorov-complexity
code-golf string kolmogorov-complexity
edited 22 mins ago
Jonah
asked 9 hours ago
JonahJonah
3,5061019
3,5061019
$begingroup$
There's a reason snippets are banned by default. As is, someone can just submit"N NE E SE S SW W NW"
as a valid answer for most sttandard languages. Please consider removing that, since no-one has yet taken advantage of it
$endgroup$
– Jo King
1 hour ago
$begingroup$
Perhaps allowing them to be output in any order would be slightly more interesting
$endgroup$
– Jo King
1 hour ago
$begingroup$
@JoKing Sure, I'll remove that. Honestly, I didn't expect anyone to submit answers that used the full literal value -- that's not in the spirit of the question. As I state, it came up because I wasn't able to beat the literal in J, despite the string having regularity and structure of a sort. The whole point is to exploit that regularity to beat a literal answer. Bad on me for not being more explicit. Allowing them any order defeats that as well, so I don't want to make that change.
$endgroup$
– Jonah
23 mins ago
add a comment |
$begingroup$
There's a reason snippets are banned by default. As is, someone can just submit"N NE E SE S SW W NW"
as a valid answer for most sttandard languages. Please consider removing that, since no-one has yet taken advantage of it
$endgroup$
– Jo King
1 hour ago
$begingroup$
Perhaps allowing them to be output in any order would be slightly more interesting
$endgroup$
– Jo King
1 hour ago
$begingroup$
@JoKing Sure, I'll remove that. Honestly, I didn't expect anyone to submit answers that used the full literal value -- that's not in the spirit of the question. As I state, it came up because I wasn't able to beat the literal in J, despite the string having regularity and structure of a sort. The whole point is to exploit that regularity to beat a literal answer. Bad on me for not being more explicit. Allowing them any order defeats that as well, so I don't want to make that change.
$endgroup$
– Jonah
23 mins ago
$begingroup$
There's a reason snippets are banned by default. As is, someone can just submit
"N NE E SE S SW W NW"
as a valid answer for most sttandard languages. Please consider removing that, since no-one has yet taken advantage of it$endgroup$
– Jo King
1 hour ago
$begingroup$
There's a reason snippets are banned by default. As is, someone can just submit
"N NE E SE S SW W NW"
as a valid answer for most sttandard languages. Please consider removing that, since no-one has yet taken advantage of it$endgroup$
– Jo King
1 hour ago
$begingroup$
Perhaps allowing them to be output in any order would be slightly more interesting
$endgroup$
– Jo King
1 hour ago
$begingroup$
Perhaps allowing them to be output in any order would be slightly more interesting
$endgroup$
– Jo King
1 hour ago
$begingroup$
@JoKing Sure, I'll remove that. Honestly, I didn't expect anyone to submit answers that used the full literal value -- that's not in the spirit of the question. As I state, it came up because I wasn't able to beat the literal in J, despite the string having regularity and structure of a sort. The whole point is to exploit that regularity to beat a literal answer. Bad on me for not being more explicit. Allowing them any order defeats that as well, so I don't want to make that change.
$endgroup$
– Jonah
23 mins ago
$begingroup$
@JoKing Sure, I'll remove that. Honestly, I didn't expect anyone to submit answers that used the full literal value -- that's not in the spirit of the question. As I state, it came up because I wasn't able to beat the literal in J, despite the string having regularity and structure of a sort. The whole point is to exploit that regularity to beat a literal answer. Bad on me for not being more explicit. Allowing them any order defeats that as well, so I don't want to make that change.
$endgroup$
– Jonah
23 mins ago
add a comment |
13 Answers
13
active
oldest
votes
$begingroup$
Canvas, 12 bytes
>X½+T)AuS{⁹‟
Try it here!
The string, simply compressed.
$endgroup$
add a comment |
$begingroup$
PHP, 19 bytes
N NE E SE S SW W NW
Try it online!
Getting this out of the way. Someone will do it eventually.
$endgroup$
add a comment |
$begingroup$
Charcoal, 14 bytes
”{⊟“�_Zn↖⦄RüΦ≦
Try it online! Link is to verbose version of code... which is just the string to be printed, as the auto-deverbosifier takes care of the string compression.
Printing the string uncompressed takes 19 bytes, since Charcoal prints printable ASCII literally. The best algorithmic answer I could come up with unfortunately takes 20 bytes:
E⁸ΦSNWE›³﹪⁻﹪⁺⁵×⁶μχι⁸
Try it online! Outputs using array format (would cost two bytes to join the elements on spaces). Works by noticing that the letters of the string SNWE
are used only when the current outer index equals or is 1 away (modulo 8) in either direction from the corresponding element of the list of indices 4,0,6,2
.
$endgroup$
add a comment |
$begingroup$
Jelly, 18 bytes
“ç0ṫḥ¡yƊHȯ ȦṇCṂcḊ»
Try it online!
The string compressed
$endgroup$
add a comment |
$begingroup$
Jelly, 16 bytes
“æṖØq’ḃ⁴ḃ4ị“NESW
Try it online!
With footer to print separated by space
A niladic link which returns a list of strings. 2 bytes shorter (and arguably more interesting) than the compressed string in Jelly.
$endgroup$
add a comment |
$begingroup$
Jelly, 16 15 bytes
“¤œỵpq⁵’ṃ“NESW
A full program printing the text
Try it online!
16...
“¥Þ¡¦¢¬£æ‘ṃ“¡ɱ⁻»
A niladic Link which yields a list of lists of (lowercase) characters.
Try it online!
Alternative 15 as a niladic Link which yields a list of (lowercase) characters (with spaces): “¡XÇŀqỵÑ’ṃ“¡⁴ṁ»
.
$endgroup$
add a comment |
$begingroup$
Brain-Flak, 204 bytes
((((((((((((((((()()()){}()){}){}())){}{}))<([([][]){}()]{})(([][]){}[])>)<([][]
()())>)[[]]()())<([]()()())>)<((([]())[][]){}[][()])>)<([][()()])>[[]()])<([][((
)()){}])>)((()()())){}{})<((()()()()()){})>)
Try it online!
$endgroup$
add a comment |
$begingroup$
brainfuck, 142 139 bytes
++++++++[>++++>++++++++++<<-]>>--.<.>.---------.<.>.<.>++++++++++++++.--------------.<.>++++++++++++++.<.>.++++.<.>.<.>---------.+++++++++.
Try it online!
OK, it works. Now to start golfing it.
$endgroup$
$begingroup$
Lol I've never understood how anyone can "golf" these obscure languages. Its hard enough to understand what the code does in the first place (this is said coming from C++ / Java background)
$endgroup$
– mackycheese21
1 hour ago
add a comment |
$begingroup$
Japt, 16 bytes
Returns an array of lowercase strings. The compressed string was 18 bytes but using a
as the delimiter instead and then splitting on that worked out shorter.
`nÂà!Z°°nw`qa
Try it - footer formats the output.
$endgroup$
add a comment |
$begingroup$
05AB1E, 14 bytes
.•2Àβ‡yÞJŒ¾oÒ8
Try it online!
This prints out the string except lowercase.
$endgroup$
$begingroup$
Just remove the final•
for -1
$endgroup$
– Grimy
3 hours ago
add a comment |
$begingroup$
Python 2, 27 26 bytes
print"N NE E SE S SW W NW"
Try it online!
boring solution
$endgroup$
$begingroup$
Redundant space before"
$endgroup$
– Jonathan Allan
7 hours ago
$begingroup$
@JonathanAllan Oh, whoops!
$endgroup$
– MilkyWay90
7 hours ago
add a comment |
$begingroup$
Java, 24 25 bytes
Quick, gotta do it before anyone else
()->"N NE E SE S SW W NW"
+1 byte; we can't take arguments (although I can argue that null
is technically the absence of an argument).
TIO
$endgroup$
add a comment |
$begingroup$
C# (Visual C# Interactive Compiler), 24 bytes
_=>"N NE E SE S SW W NW"
Try it online!
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "200"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f186582%2fprint-n-ne-e-se-s-sw-w-nw%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
13 Answers
13
active
oldest
votes
13 Answers
13
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Canvas, 12 bytes
>X½+T)AuS{⁹‟
Try it here!
The string, simply compressed.
$endgroup$
add a comment |
$begingroup$
Canvas, 12 bytes
>X½+T)AuS{⁹‟
Try it here!
The string, simply compressed.
$endgroup$
add a comment |
$begingroup$
Canvas, 12 bytes
>X½+T)AuS{⁹‟
Try it here!
The string, simply compressed.
$endgroup$
Canvas, 12 bytes
>X½+T)AuS{⁹‟
Try it here!
The string, simply compressed.
answered 8 hours ago
dzaimadzaima
16.5k22061
16.5k22061
add a comment |
add a comment |
$begingroup$
PHP, 19 bytes
N NE E SE S SW W NW
Try it online!
Getting this out of the way. Someone will do it eventually.
$endgroup$
add a comment |
$begingroup$
PHP, 19 bytes
N NE E SE S SW W NW
Try it online!
Getting this out of the way. Someone will do it eventually.
$endgroup$
add a comment |
$begingroup$
PHP, 19 bytes
N NE E SE S SW W NW
Try it online!
Getting this out of the way. Someone will do it eventually.
$endgroup$
PHP, 19 bytes
N NE E SE S SW W NW
Try it online!
Getting this out of the way. Someone will do it eventually.
answered 5 hours ago
gwaughgwaugh
2,9581722
2,9581722
add a comment |
add a comment |
$begingroup$
Charcoal, 14 bytes
”{⊟“�_Zn↖⦄RüΦ≦
Try it online! Link is to verbose version of code... which is just the string to be printed, as the auto-deverbosifier takes care of the string compression.
Printing the string uncompressed takes 19 bytes, since Charcoal prints printable ASCII literally. The best algorithmic answer I could come up with unfortunately takes 20 bytes:
E⁸ΦSNWE›³﹪⁻﹪⁺⁵×⁶μχι⁸
Try it online! Outputs using array format (would cost two bytes to join the elements on spaces). Works by noticing that the letters of the string SNWE
are used only when the current outer index equals or is 1 away (modulo 8) in either direction from the corresponding element of the list of indices 4,0,6,2
.
$endgroup$
add a comment |
$begingroup$
Charcoal, 14 bytes
”{⊟“�_Zn↖⦄RüΦ≦
Try it online! Link is to verbose version of code... which is just the string to be printed, as the auto-deverbosifier takes care of the string compression.
Printing the string uncompressed takes 19 bytes, since Charcoal prints printable ASCII literally. The best algorithmic answer I could come up with unfortunately takes 20 bytes:
E⁸ΦSNWE›³﹪⁻﹪⁺⁵×⁶μχι⁸
Try it online! Outputs using array format (would cost two bytes to join the elements on spaces). Works by noticing that the letters of the string SNWE
are used only when the current outer index equals or is 1 away (modulo 8) in either direction from the corresponding element of the list of indices 4,0,6,2
.
$endgroup$
add a comment |
$begingroup$
Charcoal, 14 bytes
”{⊟“�_Zn↖⦄RüΦ≦
Try it online! Link is to verbose version of code... which is just the string to be printed, as the auto-deverbosifier takes care of the string compression.
Printing the string uncompressed takes 19 bytes, since Charcoal prints printable ASCII literally. The best algorithmic answer I could come up with unfortunately takes 20 bytes:
E⁸ΦSNWE›³﹪⁻﹪⁺⁵×⁶μχι⁸
Try it online! Outputs using array format (would cost two bytes to join the elements on spaces). Works by noticing that the letters of the string SNWE
are used only when the current outer index equals or is 1 away (modulo 8) in either direction from the corresponding element of the list of indices 4,0,6,2
.
$endgroup$
Charcoal, 14 bytes
”{⊟“�_Zn↖⦄RüΦ≦
Try it online! Link is to verbose version of code... which is just the string to be printed, as the auto-deverbosifier takes care of the string compression.
Printing the string uncompressed takes 19 bytes, since Charcoal prints printable ASCII literally. The best algorithmic answer I could come up with unfortunately takes 20 bytes:
E⁸ΦSNWE›³﹪⁻﹪⁺⁵×⁶μχι⁸
Try it online! Outputs using array format (would cost two bytes to join the elements on spaces). Works by noticing that the letters of the string SNWE
are used only when the current outer index equals or is 1 away (modulo 8) in either direction from the corresponding element of the list of indices 4,0,6,2
.
answered 8 hours ago
NeilNeil
84.7k845183
84.7k845183
add a comment |
add a comment |
$begingroup$
Jelly, 18 bytes
“ç0ṫḥ¡yƊHȯ ȦṇCṂcḊ»
Try it online!
The string compressed
$endgroup$
add a comment |
$begingroup$
Jelly, 18 bytes
“ç0ṫḥ¡yƊHȯ ȦṇCṂcḊ»
Try it online!
The string compressed
$endgroup$
add a comment |
$begingroup$
Jelly, 18 bytes
“ç0ṫḥ¡yƊHȯ ȦṇCṂcḊ»
Try it online!
The string compressed
$endgroup$
Jelly, 18 bytes
“ç0ṫḥ¡yƊHȯ ȦṇCṂcḊ»
Try it online!
The string compressed
answered 7 hours ago
MilkyWay90MilkyWay90
995322
995322
add a comment |
add a comment |
$begingroup$
Jelly, 16 bytes
“æṖØq’ḃ⁴ḃ4ị“NESW
Try it online!
With footer to print separated by space
A niladic link which returns a list of strings. 2 bytes shorter (and arguably more interesting) than the compressed string in Jelly.
$endgroup$
add a comment |
$begingroup$
Jelly, 16 bytes
“æṖØq’ḃ⁴ḃ4ị“NESW
Try it online!
With footer to print separated by space
A niladic link which returns a list of strings. 2 bytes shorter (and arguably more interesting) than the compressed string in Jelly.
$endgroup$
add a comment |
$begingroup$
Jelly, 16 bytes
“æṖØq’ḃ⁴ḃ4ị“NESW
Try it online!
With footer to print separated by space
A niladic link which returns a list of strings. 2 bytes shorter (and arguably more interesting) than the compressed string in Jelly.
$endgroup$
Jelly, 16 bytes
“æṖØq’ḃ⁴ḃ4ị“NESW
Try it online!
With footer to print separated by space
A niladic link which returns a list of strings. 2 bytes shorter (and arguably more interesting) than the compressed string in Jelly.
answered 7 hours ago
Nick KennedyNick Kennedy
2,974610
2,974610
add a comment |
add a comment |
$begingroup$
Jelly, 16 15 bytes
“¤œỵpq⁵’ṃ“NESW
A full program printing the text
Try it online!
16...
“¥Þ¡¦¢¬£æ‘ṃ“¡ɱ⁻»
A niladic Link which yields a list of lists of (lowercase) characters.
Try it online!
Alternative 15 as a niladic Link which yields a list of (lowercase) characters (with spaces): “¡XÇŀqỵÑ’ṃ“¡⁴ṁ»
.
$endgroup$
add a comment |
$begingroup$
Jelly, 16 15 bytes
“¤œỵpq⁵’ṃ“NESW
A full program printing the text
Try it online!
16...
“¥Þ¡¦¢¬£æ‘ṃ“¡ɱ⁻»
A niladic Link which yields a list of lists of (lowercase) characters.
Try it online!
Alternative 15 as a niladic Link which yields a list of (lowercase) characters (with spaces): “¡XÇŀqỵÑ’ṃ“¡⁴ṁ»
.
$endgroup$
add a comment |
$begingroup$
Jelly, 16 15 bytes
“¤œỵpq⁵’ṃ“NESW
A full program printing the text
Try it online!
16...
“¥Þ¡¦¢¬£æ‘ṃ“¡ɱ⁻»
A niladic Link which yields a list of lists of (lowercase) characters.
Try it online!
Alternative 15 as a niladic Link which yields a list of (lowercase) characters (with spaces): “¡XÇŀqỵÑ’ṃ“¡⁴ṁ»
.
$endgroup$
Jelly, 16 15 bytes
“¤œỵpq⁵’ṃ“NESW
A full program printing the text
Try it online!
16...
“¥Þ¡¦¢¬£æ‘ṃ“¡ɱ⁻»
A niladic Link which yields a list of lists of (lowercase) characters.
Try it online!
Alternative 15 as a niladic Link which yields a list of (lowercase) characters (with spaces): “¡XÇŀqỵÑ’ṃ“¡⁴ṁ»
.
edited 7 hours ago
answered 7 hours ago
Jonathan AllanJonathan Allan
56.2k538178
56.2k538178
add a comment |
add a comment |
$begingroup$
Brain-Flak, 204 bytes
((((((((((((((((()()()){}()){}){}())){}{}))<([([][]){}()]{})(([][]){}[])>)<([][]
()())>)[[]]()())<([]()()())>)<((([]())[][]){}[][()])>)<([][()()])>[[]()])<([][((
)()){}])>)((()()())){}{})<((()()()()()){})>)
Try it online!
$endgroup$
add a comment |
$begingroup$
Brain-Flak, 204 bytes
((((((((((((((((()()()){}()){}){}())){}{}))<([([][]){}()]{})(([][]){}[])>)<([][]
()())>)[[]]()())<([]()()())>)<((([]())[][]){}[][()])>)<([][()()])>[[]()])<([][((
)()){}])>)((()()())){}{})<((()()()()()){})>)
Try it online!
$endgroup$
add a comment |
$begingroup$
Brain-Flak, 204 bytes
((((((((((((((((()()()){}()){}){}())){}{}))<([([][]){}()]{})(([][]){}[])>)<([][]
()())>)[[]]()())<([]()()())>)<((([]())[][]){}[][()])>)<([][()()])>[[]()])<([][((
)()){}])>)((()()())){}{})<((()()()()()){})>)
Try it online!
$endgroup$
Brain-Flak, 204 bytes
((((((((((((((((()()()){}()){}){}())){}{}))<([([][]){}()]{})(([][]){}[])>)<([][]
()())>)[[]]()())<([]()()())>)<((([]())[][]){}[][()])>)<([][()()])>[[]()])<([][((
)()){}])>)((()()())){}{})<((()()()()()){})>)
Try it online!
answered 6 hours ago
DJMcMayhem♦DJMcMayhem
40.8k12151317
40.8k12151317
add a comment |
add a comment |
$begingroup$
brainfuck, 142 139 bytes
++++++++[>++++>++++++++++<<-]>>--.<.>.---------.<.>.<.>++++++++++++++.--------------.<.>++++++++++++++.<.>.++++.<.>.<.>---------.+++++++++.
Try it online!
OK, it works. Now to start golfing it.
$endgroup$
$begingroup$
Lol I've never understood how anyone can "golf" these obscure languages. Its hard enough to understand what the code does in the first place (this is said coming from C++ / Java background)
$endgroup$
– mackycheese21
1 hour ago
add a comment |
$begingroup$
brainfuck, 142 139 bytes
++++++++[>++++>++++++++++<<-]>>--.<.>.---------.<.>.<.>++++++++++++++.--------------.<.>++++++++++++++.<.>.++++.<.>.<.>---------.+++++++++.
Try it online!
OK, it works. Now to start golfing it.
$endgroup$
$begingroup$
Lol I've never understood how anyone can "golf" these obscure languages. Its hard enough to understand what the code does in the first place (this is said coming from C++ / Java background)
$endgroup$
– mackycheese21
1 hour ago
add a comment |
$begingroup$
brainfuck, 142 139 bytes
++++++++[>++++>++++++++++<<-]>>--.<.>.---------.<.>.<.>++++++++++++++.--------------.<.>++++++++++++++.<.>.++++.<.>.<.>---------.+++++++++.
Try it online!
OK, it works. Now to start golfing it.
$endgroup$
brainfuck, 142 139 bytes
++++++++[>++++>++++++++++<<-]>>--.<.>.---------.<.>.<.>++++++++++++++.--------------.<.>++++++++++++++.<.>.++++.<.>.<.>---------.+++++++++.
Try it online!
OK, it works. Now to start golfing it.
edited 5 hours ago
answered 5 hours ago
ElPedroElPedro
3,7681226
3,7681226
$begingroup$
Lol I've never understood how anyone can "golf" these obscure languages. Its hard enough to understand what the code does in the first place (this is said coming from C++ / Java background)
$endgroup$
– mackycheese21
1 hour ago
add a comment |
$begingroup$
Lol I've never understood how anyone can "golf" these obscure languages. Its hard enough to understand what the code does in the first place (this is said coming from C++ / Java background)
$endgroup$
– mackycheese21
1 hour ago
$begingroup$
Lol I've never understood how anyone can "golf" these obscure languages. Its hard enough to understand what the code does in the first place (this is said coming from C++ / Java background)
$endgroup$
– mackycheese21
1 hour ago
$begingroup$
Lol I've never understood how anyone can "golf" these obscure languages. Its hard enough to understand what the code does in the first place (this is said coming from C++ / Java background)
$endgroup$
– mackycheese21
1 hour ago
add a comment |
$begingroup$
Japt, 16 bytes
Returns an array of lowercase strings. The compressed string was 18 bytes but using a
as the delimiter instead and then splitting on that worked out shorter.
`nÂà!Z°°nw`qa
Try it - footer formats the output.
$endgroup$
add a comment |
$begingroup$
Japt, 16 bytes
Returns an array of lowercase strings. The compressed string was 18 bytes but using a
as the delimiter instead and then splitting on that worked out shorter.
`nÂà!Z°°nw`qa
Try it - footer formats the output.
$endgroup$
add a comment |
$begingroup$
Japt, 16 bytes
Returns an array of lowercase strings. The compressed string was 18 bytes but using a
as the delimiter instead and then splitting on that worked out shorter.
`nÂà!Z°°nw`qa
Try it - footer formats the output.
$endgroup$
Japt, 16 bytes
Returns an array of lowercase strings. The compressed string was 18 bytes but using a
as the delimiter instead and then splitting on that worked out shorter.
`nÂà!Z°°nw`qa
Try it - footer formats the output.
edited 5 hours ago
answered 6 hours ago
ShaggyShaggy
19.7k31768
19.7k31768
add a comment |
add a comment |
$begingroup$
05AB1E, 14 bytes
.•2Àβ‡yÞJŒ¾oÒ8
Try it online!
This prints out the string except lowercase.
$endgroup$
$begingroup$
Just remove the final•
for -1
$endgroup$
– Grimy
3 hours ago
add a comment |
$begingroup$
05AB1E, 14 bytes
.•2Àβ‡yÞJŒ¾oÒ8
Try it online!
This prints out the string except lowercase.
$endgroup$
$begingroup$
Just remove the final•
for -1
$endgroup$
– Grimy
3 hours ago
add a comment |
$begingroup$
05AB1E, 14 bytes
.•2Àβ‡yÞJŒ¾oÒ8
Try it online!
This prints out the string except lowercase.
$endgroup$
05AB1E, 14 bytes
.•2Àβ‡yÞJŒ¾oÒ8
Try it online!
This prints out the string except lowercase.
edited 11 mins ago
answered 7 hours ago
MilkyWay90MilkyWay90
995322
995322
$begingroup$
Just remove the final•
for -1
$endgroup$
– Grimy
3 hours ago
add a comment |
$begingroup$
Just remove the final•
for -1
$endgroup$
– Grimy
3 hours ago
$begingroup$
Just remove the final
•
for -1$endgroup$
– Grimy
3 hours ago
$begingroup$
Just remove the final
•
for -1$endgroup$
– Grimy
3 hours ago
add a comment |
$begingroup$
Python 2, 27 26 bytes
print"N NE E SE S SW W NW"
Try it online!
boring solution
$endgroup$
$begingroup$
Redundant space before"
$endgroup$
– Jonathan Allan
7 hours ago
$begingroup$
@JonathanAllan Oh, whoops!
$endgroup$
– MilkyWay90
7 hours ago
add a comment |
$begingroup$
Python 2, 27 26 bytes
print"N NE E SE S SW W NW"
Try it online!
boring solution
$endgroup$
$begingroup$
Redundant space before"
$endgroup$
– Jonathan Allan
7 hours ago
$begingroup$
@JonathanAllan Oh, whoops!
$endgroup$
– MilkyWay90
7 hours ago
add a comment |
$begingroup$
Python 2, 27 26 bytes
print"N NE E SE S SW W NW"
Try it online!
boring solution
$endgroup$
Python 2, 27 26 bytes
print"N NE E SE S SW W NW"
Try it online!
boring solution
edited 7 hours ago
answered 7 hours ago
MilkyWay90MilkyWay90
995322
995322
$begingroup$
Redundant space before"
$endgroup$
– Jonathan Allan
7 hours ago
$begingroup$
@JonathanAllan Oh, whoops!
$endgroup$
– MilkyWay90
7 hours ago
add a comment |
$begingroup$
Redundant space before"
$endgroup$
– Jonathan Allan
7 hours ago
$begingroup$
@JonathanAllan Oh, whoops!
$endgroup$
– MilkyWay90
7 hours ago
$begingroup$
Redundant space before
"
$endgroup$
– Jonathan Allan
7 hours ago
$begingroup$
Redundant space before
"
$endgroup$
– Jonathan Allan
7 hours ago
$begingroup$
@JonathanAllan Oh, whoops!
$endgroup$
– MilkyWay90
7 hours ago
$begingroup$
@JonathanAllan Oh, whoops!
$endgroup$
– MilkyWay90
7 hours ago
add a comment |
$begingroup$
Java, 24 25 bytes
Quick, gotta do it before anyone else
()->"N NE E SE S SW W NW"
+1 byte; we can't take arguments (although I can argue that null
is technically the absence of an argument).
TIO
$endgroup$
add a comment |
$begingroup$
Java, 24 25 bytes
Quick, gotta do it before anyone else
()->"N NE E SE S SW W NW"
+1 byte; we can't take arguments (although I can argue that null
is technically the absence of an argument).
TIO
$endgroup$
add a comment |
$begingroup$
Java, 24 25 bytes
Quick, gotta do it before anyone else
()->"N NE E SE S SW W NW"
+1 byte; we can't take arguments (although I can argue that null
is technically the absence of an argument).
TIO
$endgroup$
Java, 24 25 bytes
Quick, gotta do it before anyone else
()->"N NE E SE S SW W NW"
+1 byte; we can't take arguments (although I can argue that null
is technically the absence of an argument).
TIO
edited 2 hours ago
answered 2 hours ago
Benjamin UrquhartBenjamin Urquhart
1,046119
1,046119
add a comment |
add a comment |
$begingroup$
C# (Visual C# Interactive Compiler), 24 bytes
_=>"N NE E SE S SW W NW"
Try it online!
$endgroup$
add a comment |
$begingroup$
C# (Visual C# Interactive Compiler), 24 bytes
_=>"N NE E SE S SW W NW"
Try it online!
$endgroup$
add a comment |
$begingroup$
C# (Visual C# Interactive Compiler), 24 bytes
_=>"N NE E SE S SW W NW"
Try it online!
$endgroup$
C# (Visual C# Interactive Compiler), 24 bytes
_=>"N NE E SE S SW W NW"
Try it online!
answered 46 mins ago
Embodiment of IgnoranceEmbodiment of Ignorance
3,984128
3,984128
add a comment |
add a comment |
If this is an answer to a challenge…
…Be sure to follow the challenge specification. However, please refrain from exploiting obvious loopholes. Answers abusing any of the standard loopholes are considered invalid. If you think a specification is unclear or underspecified, comment on the question instead.
…Try to optimize your score. For instance, answers to code-golf challenges should attempt to be as short as possible. You can always include a readable version of the code in addition to the competitive one.
Explanations of your answer make it more interesting to read and are very much encouraged.…Include a short header which indicates the language(s) of your code and its score, as defined by the challenge.
More generally…
…Please make sure to answer the question and provide sufficient detail.
…Avoid asking for help, clarification or responding to other answers (use comments instead).
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f186582%2fprint-n-ne-e-se-s-sw-w-nw%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
There's a reason snippets are banned by default. As is, someone can just submit
"N NE E SE S SW W NW"
as a valid answer for most sttandard languages. Please consider removing that, since no-one has yet taken advantage of it$endgroup$
– Jo King
1 hour ago
$begingroup$
Perhaps allowing them to be output in any order would be slightly more interesting
$endgroup$
– Jo King
1 hour ago
$begingroup$
@JoKing Sure, I'll remove that. Honestly, I didn't expect anyone to submit answers that used the full literal value -- that's not in the spirit of the question. As I state, it came up because I wasn't able to beat the literal in J, despite the string having regularity and structure of a sort. The whole point is to exploit that regularity to beat a literal answer. Bad on me for not being more explicit. Allowing them any order defeats that as well, so I don't want to make that change.
$endgroup$
– Jonah
23 mins ago