6
2
Introduction
Here at code colf SE, we appear to love meta-problems. Here, I've tried to compose a meta-problem that's an interesting, not-straightforward challenge.
Challenge
The answer code is allowed to read its own source code, but not allowed to use external resources.
All characters should be 5-lines tall. Characters used in the ascii representation are also not important, though they must be visible. Each visible character in the output will count as one byte, regardless of cheaty byte-values. Spaces used in the code are necessary, and may be only one byte wide if desired.
Lowest Byte Count of the output wins. Output must exist and include at least 1 visible byte.
Example Input and Output
Input:
For an example code:
print theanswer
One possible answer is:
Output:
PPPP RRRR III N N TTTTTT TTTTTT H H EEEE AA N N SSS W W EEEE RRRR
P P R R I NN N TT TT H H E A A NN N S W W E R R
PPPP RRRR I N N N TT TT HHHH EEE AAAA N N N SSS W W W EEE RRRR
P R R I N NN TT TT H H E A A N NN S W W W E R R
P R RR III N N TT TT H H EEEE A A N N SSSS W W EEEE R RR
The alphabet used should consist of the following patterns, the characters used are not important: :
AA BBBB CCC DDD EEEE FFFF GGG H H III J K K L M M N N OOO PPPP QQQ RRRR SSS TTTTTT U U V V W W X X Y Y ZZZZZ
A A B B C D D E F G H H I J K K L MM MM NN N O O P P Q Q R R S TT U U V V W W X X Y Y Z
AAAA BBBB C D D EEE FFF G GG HHHH I J KK L M M M N N N O O PPPP Q Q RRRR SSS TT U U V V W W W X Y Z
A A B B C D D E F G G H H I J J K K L M M N NN O O P Q Q R R S TT U U V V W W W X X Y Z
A A BBBB CCC DDD EEEE F GGG H H III JJJ K K LLLL M M N N OOO P QQ Q R RR SSSS TT UUU V W W X X Y ZZZZZ
11 22 333 4 4 5555 6 77777 888 9999 000 //!!! @@@ # # % %% ^^ && (( ))
111 2 2 3 4 4 5 6 7 8 8 9 9 0 00 // !!! @ @ ##### %% ^ ^ & & (( ))
11 2 33 4444 555 6666 7 888 9999 0 0 0 // !!! @ @@ # # %% &&& &(( ))
11 2 3 4 5 6 6 7 8 8 9 00 0 // @ ##### %% & & & (( ))
11l1 2222 333 4 555 666 7 888 9 000 // !!! @@@ # # %% % &&&& (( )) ____
For other characters, the equivalent produced by this generator using the 'Alphabet' font will be acceptable. If the output generated by the tool is more than 5 characters tall, use the central 5 characters for output.
Edit - I've allowed the program to read its own source code to possibly open this question up to interesting answers.
7You should precisely describe the "font" to be used, otherwise you'll have lots of people deciding separately whether W needs to be 6 or 5 or fewer columns wide, etc. – Sparr – 2015-05-08T21:31:34.837
1Commonly these types of problems forbid a program from reading its own source code (or external resources and such). Is this the case here, and if so can you specify so in the problem. – KSab – 2015-05-08T21:36:12.000
2Are spaces necessary, I don't see them in the example? – Maltysen – 2015-05-08T21:41:29.910
So we can no longer just use
*
? – Tim – 2015-05-08T21:44:00.033edited for these questions- spaces existing in the code are necessary and can be as small as one bit wide. You can use any character in place of the alphanumerics used in the font. – Thomas Cleberg – 2015-05-08T21:47:55.183
1@ThomasCleberg The
A
looks like it's missing a space on the first line (AA
would look better than the currentAA
) – None – 2015-05-09T08:32:21.990Ew... the
$
generated by the linked page is 7 lines tall instead of 5. :( – Jordan – 2016-07-21T16:32:03.897Does the middle 5 lines of that character seem like a reasonable solution? – Thomas Cleberg – 2016-07-21T16:36:17.933
Seems reasonable to me! – Jordan – 2016-07-21T16:43:08.613
1Edited to include these instructions. – Thomas Cleberg – 2016-07-21T16:47:34.287
Here's another odd one: underscore is four blank lines followed by two lines of four underscores (and no trailing space). – Jordan – 2016-07-21T16:52:36.363
1Let's call that one 4 underscores at the bottom of a 5x4 block. I will edit it into the description when at a computer. – Thomas Cleberg – 2016-07-21T17:01:57.980
No- boring loopholes are boring. – Thomas Cleberg – 2016-08-09T13:16:03.897
Also, specifically has to have at least one visible character in the output as specified. – Thomas Cleberg – 2016-08-09T13:17:42.953
I didn't (and still don't) see the 1 in the output. Please note that spaces are significant characters in the output and must be represented as well :) Interesting loopholes are interesting! – Thomas Cleberg – 2016-08-09T14:08:42.473
Ah, I see it now. This is a valid answer once the spaces involved are represented in the output (by an at-least 1w,5h set of spaces per space in the source), and likely close to an optimal solution, though ^ and L use fewer characters in the output. White space is not included in the score calculation, but is required in the output. – Thomas Cleberg – 2016-08-09T14:18:12.520
Whitespace's winning – l4m2 – 2018-04-11T15:05:38.237