-2
0
A very simple golf this time, but should be fun to do.
Challenge
Output your code, but rotated 45 (or -45) degrees. E.g:
lorem ipsum dolor sit amet
becomes
t
e
m
a
t
i
s
r
o
l
o
d
m
u
s
p
i
m
e
r
o
l
This logic follows for newlines, too:
lorem ipsum dolor sit amet
consectetur adipiscing
becomes
t
e
m
a
g
t n
i i
s c
s
r i
o p
l i
o d
d a
m r
u u
s t
p e
i t
c
m e
e s
r n
o o
l c
Of course, the difficulty is that you have to output your own code in this format.
Scoring
Find position b (the amount of bytes in your code). on the X-axis of the formula \$y=\left(\frac{b}{8}-15\right)^2-n\$ (given n is the number of newlines). The lower the score, the better. Newlines are encouraged, as they made rendering it harder. Also, -15 bonus points for doing -45 degrees, as opposed to 45. My examples were -45 degrees.
Rules
- Standard loopholes apply.
- No reading your own source.
- There must be a space between one line of code and the next, if you choose to do so
- Every line must be at least 5 characters long.
- Newlines cannot be replaced with '\n'. Tabs should be replaced with two spaces.
- Every line must do something; when removed, the program must not work
- No trailing newlines (unless for an implicit return) or no-ops.
- Blank newlines should be rendered with a space in its place (you can assume its a line of contents ' ')
2What does "There must be a space between one line of code and the next, if you choose to do so" mean? – dfeuer – 2019-03-01T23:23:58.287
If you take a look at my second example, the text that was originally on two lines is now on one line, separated by space. E.g you can see it goes 'L C' on the bottom row of the second example, not 'LC' – Geza Kerecsenyi – 2019-03-01T23:28:00.483
2Also, the scoring system seems to mean that there's no point to having code under 120 bytes? – Jo King – 2019-03-02T01:28:00.277
I am sad that the second line is two columns right instead of one right and one down. – Sparr – 2019-03-02T02:40:00.680
May we print anything to STDERR? – Embodiment of Ignorance – 2019-03-02T02:42:59.533
3How does the scoring work? I feel like I did it wrong, I hv=ave the smallest byte count, but the highest score? My program fits all of the rules too! I feel like I'm missing something here... – KrystosTheOverlord – 2019-03-02T03:48:51.807
4Just FYI, this isn't code-golf anymore, it's code-challenge, since the criterion isn't strictly lowest byte count. – Rɪᴋᴇʀ – 2019-03-02T04:32:53.173
2I think what @dfeuer meant was whether the space between characters was optional or not, since you specify the conflicting statements
There must be a space
andif you choose to do so
– Jo King – 2019-03-02T11:15:18.867@JoKing If you choose to have newlines in your code – Geza Kerecsenyi – 2019-03-02T13:32:51.637
How do trailing newlines get rotated? Do I need to add any characters for them? – Post Rock Garf Hunter – 2019-03-02T15:52:15.237
@SriotchilismO'Zaic There can't be trailing newlines, since each line must have at least 5 chars – Embodiment of Ignorance – 2019-03-02T21:11:29.887
1What do you mean by
Every line must do something; when removed, the program must not work
? For example, my Perl 6 solution still runs when one of my padded lines is removed but it doesn't produce the correct output anymore. Similarly, most one-line solutions will still run when the newlines are removed, and they do produce the correct output (nothing). Do you mean to invalidate my solution or the other solutions? – Jo King – 2019-03-03T04:16:39.7831Are we allowed trailing spaces? Can we see an example of quines rotated 45 degrees, rather than -45. Especially multi-line please – Jo King – 2019-03-03T04:46:57.240