61
\$\begingroup\$

Code-Bowling

You've been hired by Brunswick Bowling to create a simple program to output the text Code Bowling on their monitors. This company is worth a pretty penny and you feel you can swindle them for quite the bit of cash.

The job description clearly states that they pay on a scoring basis and you're pretty confident you can manipulate their scoring system to your advantage and get the largest pay check possible from these guys. To do so will require you packing as much code as you can into your program/function, even though their scoring system is designed to prevent you from doing so.

Get out your piggy banks, let's code!


Challenge

The challenge is to simply output the text Code Bowling, exactly as it is written here, with the highest score possible. (See section: Scoring System below)

Leading and trailing new-lines (line-breaks) are acceptable.

Your code may be an entire program or just an executable function.


Rules

Obligatory: This challenge is using Code-Bowling: Common Rules, Revision 1.0.0; See Meta for details.

  1. Character : Byte Ratio
    In Code-Bowling a character-count is preferred over a byte-count. The obvious reasoning for this is that multi-byte unicode characters (e.g. 🁮) can be used in place of single-byte unicode characters to fluff up byte count and will make bowling more about who renames the most variables with high-byte unicode characters rather than who most strategically creates meaningful complex code.

  2. Variable/Function/Object Names
    All variable names (or object pointers, function names, etc) should be 1 character long. The only acceptable time to use 2-character variables names is after all possible 1-character variables have been used. The only acceptable time to use 3-character variables names is after all possible 2-character variables have been used. Etc.

  3. Un-used Code
    All code must be used. Meaning the program must fail to always properly complete the task if any individual character (or varying set(s) of characters) is/are removed. Naturally, a subset of the program should not be able complete the task on its own without the rest of the program.

  4. Comments
    Comments are not permitted towards character-count, unless somehow utilized by your program/function.


Scoring System:

  Pangram Challenge:

A pangram is a sentence that uses every letter at least once. (The quick brown fox jumps over the lazy dog).

This challenge-type has a scoring systems designed where a perfect pangram would achieve the theoretical maximum score (though you are not required to use every character at least once.) Additionally, using any character more than once will start incurring a penalty. This challenge also expands to more than just the alphabetical characters.

  Scoring Metric:

  1. Each character used increases your score by 1.
  2. Repeated use of any alphanumeric character (a-z, A-Z, 0-9) will result in a deduction of 3 points per repeat (first use does not result in a deduction).
  3. Repeated use of basic punctuation ([!?.-,":';]) - including the brackets - will result in a deduction of 2 points per repeat.
  4. Repeated use of other ASCII characters {`~@#$%^&*_+=|\/><} - including the curly brackets - will result in a deduction of 4 points per repeat.
  5. Use of spaces, tabs, and newlines will result in a deduction of 1 point per use. That is, they do not count towards character total.
  6. Characters not mentioned above (Exotic Characters) will result in a deduction of 1 point per use. That is, they do not count towards character total.

  Scoring Tool:

An automated scoring widget has been created and can be found here.


This is a variant. The program with the highest score wins! (Since there is a maximum score of 94, whoever reaches it first (if it can be reached) will be marked as the accepted answer, though others are free to keep answering for fun)

\$\endgroup\$
10
  • 43
    \$\begingroup\$ I managed to get a score of -75k. If this was lowest score I'd be doing amazingly. \$\endgroup\$
    – ATaco
    Commented Mar 14, 2017 at 6:04
  • 1
    \$\begingroup\$ @carusocomputing Try headsecks. The score will probably still be awful. Also, you couldn't really use BF, since any non-commands are comments and could be removed. \$\endgroup\$
    – mbomb007
    Commented Mar 14, 2017 at 22:32
  • 1
    \$\begingroup\$ Delimit would be good for this, because it doesn't really care what characters you use, just the combined ASCII of a set of characters \$\endgroup\$
    – MercyBeaucou
    Commented Mar 15, 2017 at 5:38
  • 2
    \$\begingroup\$ Shortest code would be a nice tiebreaker on this challenge! \$\endgroup\$
    – Stewie Griffin
    Commented Mar 15, 2017 at 20:26
  • 2
    \$\begingroup\$ Maybe someone can solve that by awarding bounties to the other 94-ers \$\endgroup\$
    – masterX244
    Commented Mar 16, 2017 at 12:33

31 Answers 31

51
\$\begingroup\$

Python 3, 82 87 88

Thanks to @JonathanAllan for +1 score

print("g!#$%&'*n+,./012i34579;<l=>?@ADEwFGHIJKLoMNOPQRSBTUVWXYZ ^_`abchejkmqsuvdyz{|}~ \x6f       C"[::-8])

Try it online!

Nothing special, just slicing and skipping characters. The string is reversed so you can't remove characters and have the original string being printed.

\$\endgroup\$
6
  • 3
    \$\begingroup\$ Woah. that is good. \$\endgroup\$
    – Matthew Roh
    Commented Mar 14, 2017 at 7:53
  • 1
    \$\begingroup\$ Very nice answer, but why the shuffled order? Wouldn't it be simpler (for you) to have it in the order they are naturally (HIJKLMN...) except for every 8th character of course? \$\endgroup\$
    – Stewie Griffin
    Commented Mar 14, 2017 at 14:17
  • \$\begingroup\$ @StewieGriffin It would have been easier, yes. I just iterated through sets and didn't really care about sorting. \$\endgroup\$
    – TidB
    Commented Mar 14, 2017 at 15:03
  • \$\begingroup\$ Is there a reason you filled the other characters in such a strange order? \$\endgroup\$
    – mbomb007
    Commented Mar 14, 2017 at 15:48
  • 2
    \$\begingroup\$ You're such as inspiration TidB! My new question :) \$\endgroup\$
    – Stewie Griffin
    Commented Mar 15, 2017 at 13:49
39
\$\begingroup\$

Glypho, 94

The source file is encoded in CP437.

␀␀!"â˜șâ˜ș#$â˜»â™„â™„â˜»â™Šâ™Łâ™Šâ™Ł%♠♠&‱◘‱◘'○○(◙♂◙♂♀â™Șâ™Ș♀♫☌♫☌â–ș◄◄â–ș↕↕)*‌¶¶‌§§+,▬↹↹▬↑↓↑↓→←→←∟∟-.↔â–Čâ–Č↔/â–Œâ–Œâ–ŒâŒ‚Ă‡âŒ‚Ă‡ĂŒĂ©Ă©ĂŒĂąĂą01ÀÀ23àÄÄàçĂȘçĂȘ4Ă«Ă«5ÚïÚïßß67ìÄÄì8ÅÅ9ÉÉ:;éÆÆéî<=ÎöĂČĂČöûĂčĂ»Ăč>ÿÿÿÖÖ?@ÜÜAB¹££¹„₧„₧CƒƒDåíåíóóEFĂșññĂșÑÂȘÑÂȘGÂșÂșHI¿¿J⌐¬⌐¬KœœœŒŒLM¥««¥N»»»░░OP▒▒QR▓││▓─╥─╥S╱╱T╖╕╖╕U╣╣V║╗║╗╝╜╜╝W╛╛╛┐X┐┐Y└└└┮┬┮┬├─├─Z┌┌┌╞╞[\╟╟]^╚╔╔╚╩╊╩╊_╠╠`═╏═╏╧╚╚╧╀╄╄╀a╙╙╙╘╘bc╒╒de╓╓fg╫â•Șâ•Ș╫┘┌┌┘█▄█▄▌hi▌▐jâ–â–â–€Î±Î±â–€ĂŸÎ“ĂŸÎ“Ï€ÎŁÏ€ÎŁkσσσ”l””τmnτΊΘΘΊΩΎΩΎo∞∞∞φpφφΔΔqrâˆ©â‰Ąâ‰Ąâˆ©Â±Â±st≄≀≀≄u⌠⌠⌠⌡⌡vwĂ·xyĂ·â‰ˆÂ°Â°â‰ˆâˆ™âˆ™z{·|}Â·âˆšâżâżâˆš~ÂČÂČÂČ

Try it online!

Explanation

Glypho is quite useful for challenges like this because it doesn't care about the actual characters being used at all. Instead it looks at each chunk of 4 characters and the command being used is determined by the pattern these four characters make:

0000 n
0001 i
0010 >
0011 \
0012 1
0100 <
0101 d
0102 [
0110 +
0111 o
0112 *
0120 -
0121 ]
0122 !
0123 e

That means we can just solve the problem and then fill in unique characters in each quartet with the printable characters and all the repeated ones with some of the "exotic" characters, which are ignored by the scoring. Glypho is sufficiently verbose that a normal handwritten solution contains enough unique characters to fit all the 94 printable ones inside. In fact, I ended up golfing it down until it had exactly 94, just so that I could use unique exotic characters for the repeated ones (hopefully, to make it harder to reduce the program).

The shorthand form of the above program is this:

11+d*d*d+d+1+1+dd1+o
d+11+d*d1+*1+-+do
11+d*d1+d**do
1+o
11+d*d*d+o
<o
ddo
11+d*d++o
111++d-<+ddo
<-+do
<1+1+o
1-+1-+o

Where each line prints one of the characters.

I've used this Retina script to convert it to Glypho using 0123. Afterwards, I've just filled in the characters in place of the digits.

In theory it might be possible to reduce this further, if someone managed to golf down the shorthand program and then managed to recombine the characters such that the right patterns show up, but I'm not sure how to prove or disprove that this is possible. If anyone manages to form a valid solution from a subset of my program, please let me know so I can delete the answer until it's fixed. Until then, I'll have to assume that this is valid.

\$\endgroup\$
3
  • \$\begingroup\$ Great stuff! I'm accepting this for now since 94 is the maximum score. Everyone else is free to keep submitting answers for fun though. \$\endgroup\$
    – Albert Renshaw
    Commented Mar 14, 2017 at 15:55
  • \$\begingroup\$ Great job, Martin! If only I'd been a few hours faster... :D \$\endgroup\$
    – mbomb007
    Commented Mar 14, 2017 at 22:35
  • \$\begingroup\$ @AlbertRenshaw Maybe the tie-breaker should be byte-count? :D \$\endgroup\$
    – mbomb007
    Commented Mar 14, 2017 at 23:40
20
\$\begingroup\$

><>, 92 94

YAY, I DID IT!

␑ is the exotic character \x11 with decimal value 17. The program exits with an error after printing the result (it's a stack underflow). I had to manage which mirrors and directional commands I used carefully, since I can only use each one once.

   >"vCoUV␑3`h]Z_X
       /a[f+
#$%&'r(!
.0456~8?
:;<=@9l)
ABDEFcGe
HIJKL*
MNOPQ7
RSTWYd
bgijk1
mnqst-
uwxyz2
{|}  ,
     \p^

Try it online

The core program:

   >"vCoUV␑3`h]Z_X
       /a[f+
     r !
     ~ ?
     9 )
     c e
     *
     7
     d
     1
     -
     2
     ,
     \p^

Explanation:

Push the string vCoUV␑3`h]Z_X > (execution wraps). Move downward. Reverse the stack and remove the v.

Push 9 and c (12). Multiply to get 108 (l). Push 7. Push d (13), subtract 1, divide by 2 to get 6. Put l at (x,y) of (13,6), which is below the e. I could've done this way shorter, but this is lengthened so I have room to put more ASCII characters.

Move up into a loop. Push length of stack with l. If greater than 14, output character, otherwise create a new stack with top 10 elements, add 15 then reflect execution right then up and output. This is used to prevent the extra spaces and > from being printed at the end, as well as turning the random-looking string into what needs to be printed. Continue looping.

If any of the lines is shorter (by removing a character), the program will no longer work, either because the vertical parts of the program no longer line up, or because the string to print isn't correct anymore. Attempting to remove a character from in front of each line will change the stack depth and where the l is placed, also causing problems.

Fish

\$\endgroup\$
2
  • \$\begingroup\$ 94! Nice! I didn't think you'd get there haha \$\endgroup\$
    – Albert Renshaw
    Commented Mar 14, 2017 at 23:23
  • 2
    \$\begingroup\$ When I started making the first version, I knew I could reuse some. Then I got rid of the " and l with quite a bit of work. Once I hit 92, I was sure there must be a way to remove the last o. It took a bit of effort, though. You can tell by the revision history. \$\endgroup\$
    – mbomb007
    Commented Mar 14, 2017 at 23:39
16
\$\begingroup\$

Octave, 20 21 22 25 27 33

The best I've managed this far is

g=@()disp(horzcat([67 9583 -412],'e B',"nvkhmf"+!0));

This creates an anonymous function f that takes no input. You can call it f(). I'd say the semicolon at the end is necessary, in order to avoid printing of the function body.

It is possible this can be improved by combining eval and printf, but I've tried and failed over and over.

This uses all digits once, by exploting the fact that Octave does a mod(x,256) operation when implicitly converting numbers to characters. This means that we can use negative numbers, as well as numbers outside the normal 32-126-range. The following numbers all result in the letter i when converted to characters: ... -2455 -2199 -1943 ... 105 361 .... Instead of using 'owling' in the end, we use "nvkhmf" and add 1. This creates a vector of integers that are implicitly converted to characters. Instead of 1, we use !0 (or not(false). Also, we use " instead of ' to avoid two penalty points.

We need to find the set of numbers that gives the lowest score. The string Code Bowling result in the following matrix, when we subtract and add -10*256 - 10*256.

  -2493  -2449  -2460  -2459  -2528  -2494  -2449  -2441  -2452  -2455  -2450  -2457
  -2237  -2193  -2204  -2203  -2272  -2238  -2193  -2185  -2196  -2199  -2194  -2201
  -1981  -1937  -1948  -1947  -2016  -1982  -1937  -1929  -1940  -1943  -1938  -1945
  -1725  -1681  -1692  -1691  -1760  -1726  -1681  -1673  -1684  -1687  -1682  -1689
  -1469  -1425  -1436  -1435  -1504  -1470  -1425  -1417  -1428  -1431  -1426  -1433
  -1213  -1169  -1180  -1179  -1248  -1214  -1169  -1161  -1172  -1175  -1170  -1177
   -957   -913   -924   -923   -992   -958   -913   -905   -916   -919   -914   -921
   -701   -657   -668   -667   -736   -702   -657   -649   -660   -663   -658   -665
   -445   -401   -412   -411   -480   -446   -401   -393   -404   -407   -402   -409
   -189   -145   -156   -155   -224   -190   -145   -137   -148   -151   -146   -153
     67    111    100    101     32     66    111    119    108    105    110    103
    323    367    356    357    288    322    367    375    364    361    366    359
    579    623    612    613    544    578    623    631    620    617    622    615
    835    879    868    869    800    834    879    887    876    873    878    871
   1091   1135   1124   1125   1056   1090   1135   1143   1132   1129   1134   1127
   1347   1391   1380   1381   1312   1346   1391   1399   1388   1385   1390   1383
   1603   1647   1636   1637   1568   1602   1647   1655   1644   1641   1646   1639
   1859   1903   1892   1893   1824   1858   1903   1911   1900   1897   1902   1895
   2115   2159   2148   2149   2080   2114   2159   2167   2156   2153   2158   2151
   2371   2415   2404   2405   2336   2370   2415   2423   2412   2409   2414   2407
   2627   2671   2660   2661   2592   2626   2671   2679   2668   2665   2670   2663

So, ['',2627 2415 2148 1893 -2528 66 -1169 -1161 2668 105 -146 103] results in ans = Code Bowling. The challenge is then to find the set of numbers and characters that reduces the score the most. Using all digits is of course good, but duplicates are bad. Since all digits are used, and non are used twice, this is the best possible mix. Also, we get to use -, resulting in one point.

One could claim that it can be reduced to the line below (31 points), but then it would no longer be an "executable function", and would therefore have a different functionality.

disp(horzcat([67 9583 -412],'e B',"nvkhmf"+!0))
\$\endgroup\$
3
  • \$\begingroup\$ Did you try function q();disp(...) too? Except for the i(), they're nicely non-overlapping. \$\endgroup\$
    – Sanchises
    Commented Mar 15, 2017 at 12:27
  • \$\begingroup\$ @Sanchises I can check it out. But cot in horzcat and nf in the string will lower the score quite drastically. It might be better though, if I remove horzcat and creates the string another way, but then I can't use +!0 either. I'd be surprised if it increases the score to be honest... It's only 7 characters longer than the current answer, and I'll get a 7 byte penalty, in addition to the ones I mentioned. \$\endgroup\$
    – Stewie Griffin
    Commented Mar 15, 2017 at 12:30
  • 1
    \$\begingroup\$ Yeah I couldn't trivially get a higher score with function, but then I figured you might have tried this already and I would be wasting my time (as opposed to, you know, spending my time usefully on PPCG) \$\endgroup\$
    – Sanchises
    Commented Mar 15, 2017 at 12:46
12
\$\begingroup\$

QBasic, 34

This is unformatted code (yay for case-insensitivity). You can run it in QB64 or at archive.org (though note that the latter will format the code as you type it). I think I've managed to abide by all the rules.

CLS
PrINT "C
LOcatE 1, 2 : ? CHR$(957-846); "de Bowling

The CLS is necessary: without it, the C is not guaranteed to print at the top left corner of the screen, where it will line up with ode Bowling. The LOcatE is necessary: without it, ode Bowling will be printed on the line below C. I don't believe there is any subset of the program (except whitespace) that can be deleted and keep the same output.

\$\endgroup\$
5
  • 1
    \$\begingroup\$ Can you share a link to an online interpreter? I can't run this on repl.it. I get Parse failed: Syntax error at 3:36: Token(Bowling) \$\endgroup\$
    – Stewie Griffin
    Commented Mar 14, 2017 at 8:11
  • 1
    \$\begingroup\$ @StewieGriffin Edited in a couple options. \$\endgroup\$
    – DLosc
    Commented Mar 14, 2017 at 8:14
  • 1
    \$\begingroup\$ @StewieGriffin, this takes advantage of a quirk in Microsoft implementations of Basic where the closing quote of a string is optional if that string extends to the end of the line. I expect most non-Microsoft interpreters will object to the missing quotes. \$\endgroup\$
    – Mark
    Commented Mar 14, 2017 at 20:32
  • 1
    \$\begingroup\$ Apparently QBasic has a very strong smell association for me. \$\endgroup\$ Commented Mar 15, 2017 at 21:25
  • 2
    \$\begingroup\$ @DLosc It smells like the book I learned it from, and like the computer room at my house growing up. I had no idea. It was LOCATE 1, 2 that did it \$\endgroup\$ Commented Mar 15, 2017 at 22:20
12
\$\begingroup\$

C, 27 29

+2 points thanks to @ceilingcat!

f(){char q<:]="Code B\157wling";puts(q);%>
\$\endgroup\$
11
  • 2
    \$\begingroup\$ Suggest char q<:] instead of char q[] and puts(q);%> instead of puts(q);} \$\endgroup\$
    – ceilingcat
    Commented Mar 14, 2017 at 7:38
  • \$\begingroup\$ Suggestion: 1.using separate functions to output each segment of the string and then running them all in function f 2. The magic of using structs to make code unreasonably longer \$\endgroup\$
    – Matthew Roh
    Commented Mar 14, 2017 at 7:41
  • 1
    \$\begingroup\$ @MatthewRoh I think you may find the scoring system punishes that pretty heavily \$\endgroup\$
    – Albert Renshaw
    Commented Mar 14, 2017 at 7:43
  • 1
    \$\begingroup\$ @AlbertRenshaw Those are digraphs \$\endgroup\$
    – ceilingcat
    Commented Mar 14, 2017 at 7:44
  • 16
    \$\begingroup\$ Haha, first time I see a +2 points thanks to ... \$\endgroup\$
    – user41805
    Commented Mar 14, 2017 at 9:14
9
\$\begingroup\$

Haskell, score 21 38 46 47 21 70

putStr$toEnum(length"!#%&'*+,-./012345789;<=>?@ADGHIJKLMNOPQRTUVWXYZ[]^_`abcfjkqsvyz{|}~"):"ode B\x6Fwling"

Try it online! The idea is to get the leading C by constructing a string of length 67 which contains all not otherwise used characters and converting the length of this string to a character. I started with putStr$toEnum(length""):"ode B\x6Fwling" ('\x6F' is hexadecimal for '\111' which yields 'o') and computed all printable ASCII characters not contained in the program:

!#%&'*+,-./012345789;<=>?@ACDGHIJKLMNOPQRTUVWXYZ[]^_`abcfjkqsvyz{|}~

Incidentally there remain exactly 67 printable ASCII characters which can put into the string, and C itself which cannot appear in the string because then the program would be reducible to just putStr"Code B\x6Fwling".


Previous solution: (score 21)

f|x<-'C'=mapM putStr[(:)x"ode Bowling"]

Defines a function f which takes no input and prints the string. Try it online!

\$\endgroup\$
3
  • 1
    \$\begingroup\$ This can be reduced \$\endgroup\$
    – Leo
    Commented Mar 14, 2017 at 14:44
  • \$\begingroup\$ @Leo nice catch! Does this approach also work for my updated version with 95 in the string and subtracting 4621? (I don't have time to check it myself right now but will look into it some time later) \$\endgroup\$
    – Laikoni
    Commented Mar 14, 2017 at 15:34
  • 1
    \$\begingroup\$ Gotcha. Took me longer than it should have, seeing how simple the result is :) \$\endgroup\$
    – Leo
    Commented Mar 14, 2017 at 16:24
8
\$\begingroup\$

JavaScript, 19

prompt('C\157de B\x6fwlin'+"g")

Not a very high score.

\$\endgroup\$
9
  • \$\begingroup\$ z(){var x=alert('Code \nBowling');} \$\endgroup\$
    – sagiksp
    Commented Mar 14, 2017 at 6:06
  • \$\begingroup\$ @AlbertRenshaw the semicolon can be removed though \$\endgroup\$
    – ASCII-only
    Commented Mar 14, 2017 at 6:07
  • 1
    \$\begingroup\$ @sagiksp Doesn't work, doesn't have function before f \$\endgroup\$
    – ASCII-only
    Commented Mar 14, 2017 at 6:09
  • 1
    \$\begingroup\$ Damnit o was unused \$\endgroup\$
    – ASCII-only
    Commented Mar 14, 2017 at 6:19
  • 1
    \$\begingroup\$ 19: prompt('C\157de B\x6fwlin'+"g") \$\endgroup\$
    – Albert Renshaw
    Commented Mar 14, 2017 at 6:27
8
\$\begingroup\$

Jelly, 94

“!#"$&('*)+-/,13.0456:79<;>=@B?ADFHJLNCPRTEVXZ\G^IKMQ`SWbY[]d_acfhjegliknmprotquvxwy{z}Âč|³⁔⁷~°âč⁻”O%2s8UងỌ

Try it online!

105 unique characters, 11 exotics (“Âč³⁔⁷°âč⁻”ងỌ).

How?

Forms the string from 8-bit reversed ASCII where each bit is encoded using the LSB of the Unicode value of a character.

“...”O%2s8UងỌ - Main link: no arguments
“...”         - the string enclosed            !  #  "  $  &  (  '  *  )  +  -  /  ,  1  3  .  0  4  5  6  :  7  9  <  ;  >  =  @  B  ?  A  D  F  H  J  L  N  C  P  R  T  E  V  X  Z  \  G  ^  I  K  M  Q  `  S  W  b  Y  [  ]   d  _  a  c   f   h   j   e   g   l   i   k   n   m   p   r   o   t   q   u   v   x   w   y   {   z   }   Âč   |   Âł    ⁔    ⁷   ~   °    âč    ⁻
     O        - cast to ordinal (vectorises) [33,35,34,36,38,40,39,42,41,43,45,47,44,49,51,46,48,52,53,54,58,55,57,60,59,62,61,64,66,63,65,68,70,72,74,76,78,67,80,82,84,69,86,88,90,92,71,94,73,75,77,81,96,83,87,98,89,91,93,100,95,97,99,102,104,106,101,103,108,105,107,110,109,112,114,111,116,113,117,118,120,119,121,123,122,125,185,124,179,8309,8311,126,176,8313,8315]
      %2      - mod 2 (vectorises)           [ 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1,  0, 1, 1, 1,  0,  0,  0,  1,  1,  0,  1,  1,  0,  1,  0,  0,  1,  0,  1,  1,  0,  0,  1,  1,  1,  0,  1,  1,  0,  1,   1,   1,  0,  0,   1,   1]
        s8    - split into chunks of 8       [[1,1,0,0,0,0,1,0], [1,1,1,1,0,1,1,0], [0,0,1,0,0,1,1,0], [1,0,1,0,0,1,1,0], [0,0,0,0,0,1,0,0], [0,1,0,0,0,0,1,0], [1,1,1,1,0,1,1,0], [1,1,1,0,1,1,1,0], [0,0,1,1,0,1,1,0], [1,0,0,1,0,1,1,0], [0,1,1,1,0,1,1,0], [1,1,1,0,0,1,1]]
          U   - upend (vectorises)           [[0,1,0,0,0,0,1,1], [0,1,1,0,1,1,1,1], [0,1,1,0,0,1,0,0], [0,1,1,0,0,1,0,1], [0,0,1,0,0,0,0,0], [0,1,0,0,0,0,1,0], [0,1,1,0,1,1,1,1], [0,1,1,1,0,1,1,1], [0,1,1,0,1,1,0,0], [0,1,1,0,1,0,0,1], [0,1,1,0,1,1,1,0], [1,1,0,0,1,1,1]]
           ᾄ  - binary to int (vectorises)   [67, 111, 100, 101, 32, 66, 111, 119, 108, 105, 110, 103]
            Ọ - to character (vectorises)    ['C', 'o', 'd', 'e', ' ', 'B', 'o', 'w', 'l', 'i', 'n', 'g']
              - implicit print               Code Bowling
\$\endgroup\$
4
  • 1
    \$\begingroup\$ Jelly is longer than others how is this possible? \$\endgroup\$
    – user63187
    Commented Mar 14, 2017 at 13:22
  • 1
    \$\begingroup\$ @DownChristopher It's actually shorter than the python answer. The python answer has repetition though. \$\endgroup\$ Commented Mar 14, 2017 at 13:23
  • \$\begingroup\$ @DownChristopher do I detect sarcasm? \$\endgroup\$
    – Jonathan Allan
    Commented Mar 14, 2017 at 13:24
  • \$\begingroup\$ @JonathanAllan no Yeah I still find it funny that jelly is pretty long here \$\endgroup\$
    – user63187
    Commented Mar 14, 2017 at 13:31
6
\$\begingroup\$

Röda, 33

{["ode B\x6fwling"]|push chr(3*4+57-2).._}

Try it online!

I tried to follow all rules. It works by first pushing the string ode Bowling! to the stream and then inserting C=3*4+57-2 to the front.

\$\endgroup\$
0
6
\$\begingroup\$

Cardinal 20

23 non whitespace characters
%#>/NI"CodeB8^o)wl,ing

-3 for repeated "o"

   I
 >\/N
%# "CodeB
 8^o
 ) w
   l
 , i
   n
   g

Pointer paths:

Step 1:
Pointer created at % going right

Step 2:
Pointer splits at # to go up, right and down (P1,P2,P3)

Step 3:
P1 Sent right by >
P2 Going right
P3 Set wait for 3 steps at 8

Step 4:
P1 Reflected down by \. \ changed to /
P2 Set to print mode by "
P3 Wait for 2 ticks at 8

Step 5:
P1 Heading down
P2 Print C
P3 Wait for 1 tick at 8

Step 6:
P1 Sent up by ^
P2 Print o
P3 Finish wait at continue, pick up ASCII value of " " (32) from )

Step 7: P1 Heading up
P2 Print d
P3 Heading down

Step 8: P1 Reflected right by \ which was changed to /
P2 Print e
P3 Print character with ASCII value=32 from , operation

Step 9:
P1 Reflected up by / which is changed to \
P2 Print B
P3 Reached end of field and stops

Step 10:
P1 Reflected down by I
P2 Reached end of field and stops

Step 11:
P1 Reflected right by / which was changed to \. Changes back to /

Step 12:
P1 Reflected left by N

Step 13:
P1 Reflected down by /

Step 14:
P1 Set to print mode by "

Step 15:
P1 Print o

Step 16:
P1 Print w

Step 17:
P1 Print l

Step 18:
P1 Print i

Step 19:
P1 Print n

Step 20:
P1 Print g

Step 21:
P1 Reaches end of field and stops.

Try it Online

\$\endgroup\$
6
\$\begingroup\$

C, 73

Thanks to @Laikoni!

F(){printf("Code B\157wli%cg",48+strlen("!#$&'*-../2369:<=>?@ADEGHIJKLMNOPQRSTUVWXYZ[]^_`abhjkmquvxyz|~"));}

Try it online!

C,  31   33  35

F(){printf("Code B\157wli%cg",96|0xD+3*4/8);}

Thanks to @ceilingcat and @DLosc for two more points and thanks to @Ørjan Johansen for another two more points!

Try it online!

\$\endgroup\$
9
  • 1
    \$\begingroup\$ @ceilingcat Then one could remove the 8- and have valid code still. 0xA-4+8 should work, though. \$\endgroup\$
    – DLosc
    Commented Mar 15, 2017 at 3:28
  • 1
    \$\begingroup\$ Would 0xA+32/8 work? (Without something being removable, that is.) \$\endgroup\$ Commented Dec 28, 2017 at 4:44
  • \$\begingroup\$ @ØrjanJohansen I think it does. None of +32, +3, +2, +3/8, +2/8, /8 or +8 produces the right output. Thanks! \$\endgroup\$
    – Steadybox
    Commented Dec 28, 2017 at 4:51
  • \$\begingroup\$ Oh, or 0xD+4*8/32. No wait, that would shorten to 0xD+4/3 wouldn't it. \$\endgroup\$ Commented Dec 28, 2017 at 4:53
  • 1
    \$\begingroup\$ Using the same approach as my Haskell answer gives a score of 74, if it is not reducible in any way: Try it online! \$\endgroup\$
    – Laikoni
    Commented Feb 28, 2018 at 23:50
4
\$\begingroup\$

Brainfuck: -204

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

Well, awful score, but was fun to write.

  • 122 characters long
  • repeated alnum: -0 ()
  • repeated punctuation: -134 (--[---].-----------..--[---]-.[-].-[---]..-----------.---..-------.)
  • repeated other: -192 (+++++++>+>+<>++++>+<>+>++<>>+<>+++++++++++++++++)
  • whitespace characters: -0 ()
  • exotic characters: -0 ()
\$\endgroup\$
3
  • \$\begingroup\$ Does Brainfuck win any PPCG challenge? ;P \$\endgroup\$ Commented Jun 21, 2017 at 0:21
  • \$\begingroup\$ @Draco18s probably not hahaha cry. \$\endgroup\$
    – Haydn Dias
    Commented Jun 21, 2017 at 18:31
  • 4
    \$\begingroup\$ 'Fun to write', you mean to type "Code Bowling" into a text generator? \$\endgroup\$
    – Jo King ♩
    Commented Feb 28, 2018 at 11:06
3
\$\begingroup\$

Batch, 19 characters

@echO(Cod%TMP:~5,1% Bowling

Starting with Windows Vista, TMP begins with C:\Users\ and therefore %TMP:~5,1% is a verbose way of writing e, despite requiring a double % at -4 penalty.

\$\endgroup\$
3
\$\begingroup\$

05AB1E, 94 points

”X1234bcde5fghijk68l9<mn>,o.p|q\/{})r(_-+s=tu*vwxyzAB&YDEFG^HI%$ZK#L@!MNO~PQR`ST':UVW[0];"”€a7îJCç€?

Try it online!


- 100 characters long
- repeated alnum:       -0 ()
- repeated punctuation: -0 ()
- repeated other:       -0 ()
- whitespace characters:  -0 ()
- exotic characters:  -6 (””€îç€)

Total score: 94

Basically converts (The Binary ASCII of Code Bowling):

['1000011', '1101111', '1100100', '1100101', '0100000', '1000010', '1101111', '1110111', '1101100', '1101001', '1101110', '1100111']

Into a string of 1's and 0's, then it replaces each 1 with a letter in the alphabet, and each 0 with a space character or a symbol or a digit.

”X1234bcde5fghijk68l9<mn>,o.p|q\/{})r(_-+s=tu*vwxyzAB&YDEFG^HI%$ZK#L@!MNO~PQR`ST':UVW[0];"”

Is the string, where 1's are letters and 0's are symbols, numbers or anything else. We then iterate through, seeing which are alphabetical, pushing 1 for alphabetical 0 for nonalphabetical. We then split into groups of 7, convert back to ASCII and print each character.

\$\endgroup\$
3
\$\begingroup\$

Java 8, 2 3 5 13 17 18 19 20 21 24 77 78 points

+53 score (24 → 77) thanks to @Laikoni.

v->(char)"!#$%&'*,/0234689:;<=?@ADEFGHIJKLMNOPQRSTUVWXYZ[]^_`bfjkmpqsuxyz{|}~".length()+"\157de Bowling"

104 characters long
- repeated alnum: -15 (helng)
- repeated punctuation: -10 ("()"")
- repeated other ASCII: none
- whitespace characters: -1
SCORE: 78

Try it online.


Old 24 bytes answer:

v->"C\157de Bowlin"+(char)103;

30 characters long
- repeated alnum: -3 (1)
- repeated punctuation: -2 (")
- repeated other ASCII: none
- whitespace characters: -1
SCORE: 24

Try it online.

\$\endgroup\$
5
  • \$\begingroup\$ Using an octal escape in the text would increase your score by 6 instead of the 2 you get for your Unicode escape (having both is worse though). Also, concatenating the first or last character will increase your score by 1. Finally think you might be better off with a lambda rather than a named function. \$\endgroup\$
    – Neil
    Commented Mar 14, 2017 at 18:27
  • \$\begingroup\$ @Neil Weird, I did already came up with Object x(){return"C\157de Bowling";} a few hours ago for 17 points.. Apparently I haven't edited / saved it in my submission, though.. :S As for the lambda, I use Java 7 which doesn't have any lambdas yet. I could add a Java 8 answer with lambda, though. \$\endgroup\$
    – Kevin Cruijssen
    Commented Mar 14, 2017 at 19:57
  • \$\begingroup\$ Whoops, sorry, I didn't notice the 7. (But don't forget the concatenation.) \$\endgroup\$
    – Neil
    Commented Mar 14, 2017 at 22:25
  • 1
    \$\begingroup\$ Using the same approach as my Haskell answer gives this version with a score of 77: Try it online!. \$\endgroup\$
    – Laikoni
    Commented Feb 28, 2018 at 15:48
  • \$\begingroup\$ @Laikoni Thanks! +53 score thanks to you. And since Java 8 answers are usually answered without the trailing semi-colon, I could remove that trailing semi-colon and replace the repeated ,, with ,; for another +1. Funny how the String using all available printable ASCII that were left is EXACTLY 97 characters for char-code C. :) \$\endgroup\$
    – Kevin Cruijssen
    Commented Feb 28, 2018 at 16:07
3
\$\begingroup\$

;#, score -1163

I don't think this would be much competition even if it could compete.

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

Try it online! Note: TIO has no ;# interpreter, only ;#+.

\$\endgroup\$
2
\$\begingroup\$

stacked, 42

(67:43,1 ab)2 9*pf sum 8/0\|>+chr'de Bowling',EPS#`

Try it online!

Leaves output on stack. Here's the breakdown:

length: 51
repeated alnum:        -0 ()
repeated punct:        -4 (',)
repeated other:        -0 ()
whitespace characters: -5 (     )
exotic characters:     -0 ()
total score: 42

I could probably make it higher, but it's at 42 soo....

Another contender, 40:

(67:43,sum)9 pf 2%MIN 0\|>+chr'de Bowling',EPS#`

I used this script for scoring it.

\$\endgroup\$
2
\$\begingroup\$

CJam, score 93

"g!#$&'()n*+/0134i5689:;<l=>?@ADEwFGHIJKLoMNOPQRSBTUVWXYZ [\]^_`aebcfhjkmdqrstuvxpyz{|}  C"7~%2,.-

Try it online

Inspired from TidB's Python answer.
Not sure if there's any way to avoid the repetition of the double quotes.

Explanation:

The string contains "Cpde Bowling" in reverse, every 8th character.
7~% extracts "Cpde Bowling" (7~ = -8)
2,.- decrements the p character (2, = [0 1])

\$\endgroup\$
3
  • \$\begingroup\$ @Laikoni if you meant that I broke the unused code rule, it should be fixed now \$\endgroup\$ Commented Mar 15, 2017 at 21:40
  • \$\begingroup\$ @Laikoni yeah, but if you remove any single character in his code it doesn't work properly, therefore, because all code is used, it's valid. \$\endgroup\$ Commented Jun 21, 2017 at 14:26
  • \$\begingroup\$ @carusocomputing The rules mention clearly that the code should not work "if any individual character (or varying set(s) of characters) is/are removed.", so I don't think your interpretation holds. Anyway, aditsu already fixed the problem so all is fine now. \$\endgroup\$
    – Laikoni
    Commented Jun 21, 2017 at 21:30
2
\$\begingroup\$

evil, -81

Better than Brainfuck!

aeeaeuwkaaeeuwygaeaeclaaxjlwalusbdgueuewguwpweewpuuuwuuuwpuweew

Explanation

aeeaeuw //Write 'C'
k       //Set P[0] to 'C'
aaeeuw  //Write 'O'
y       //Set W[0] to 'O'
gaeae   //Set Accumulator to 'D'
claa    //Create new Wheel cell at index 0, swap with Accumulator, add 2
xj      //Set alternate marker mode and drop marker
lwa     //Write value of W[0], add 1
lu      //Put it back, subtract 1 from Accumulator
sb      //Go to 'j' if Accumulator != 0
d       //Delete W[0]
        //The above loop writes 'D' and 'E'
gueuew  //Write ' '
guw     //Write 'B'
pw      //Write 'o'
eew     //Write 'w'
puuuw   //Write 'l'
uuuw    //Write 'i'
puw     //Write 'n'
eew     //Write 'g'

Submitted because nobody does anything in evil but it's kind of fun.

Score:

Length = 63

a*8  = -24
e*12 = -36
g*2  = -6
l*2  = -6
p*2  = -6
u*12  = -36
w*10  = -30

Try it online!

EDIT: TiO seems to incorrectly handle creation and deletion of new Wheel cells - I've filed a bug report on the subject. It won't work properly on there, but I ran it on my own interpreter and it works and you can trust me so I wouldn't worry about it ;)

\$\endgroup\$
2
\$\begingroup\$

Perl: 29, 33

$_=OWLING;printf%s,"C\157de".chr(30+8/4).B.lc

Score:

- 46 characters long
- repeated alnum:       -6 (rc)
- repeated punctuation: -6 ("..)
- repeated other:       -0 ()
- whitespace characters:  -1 (
)
- exotic characters:  -0 ()

Total score: 33
\$\endgroup\$
0
2
\$\begingroup\$

T-SQL, 65 18 32! points

PRINT char(78-9605*43%12) + 'ode Bowling'

Inspired by a trick in Dlosc's QBasic answer, I found a way to include all 10 digits and most of the mathematical operators (% is remainder/modulo, missing only /), mostly via trial and error . I don't think there is any way to get a 67 by removing any combination of digits/symbols, but you're welcome to try.

Version 2 (18 points, trivial):

DECLARE @ char(12)='Code Bowling'PRINT @

Not a great score, but this is what my first version simplified to (thanks, MickyT). Everything else I tried (encoding and decoding hex64, picking individual elements out of a string, converting ASCII values, etc) all had too many repeated characters (especially ECR and symbols (),@) that drive it into the negative.

Version 1 (65 points, invalid):

DECLARE @ char(123)=
'Code Bowling FGHJKMOQSUVWXYZbjkmpqsuvxyz045789 [!?.-":;]{`~#$%^&*_+|\><}'
PRINT left(@,LEN(@)/6)

I used the length of the string to determine how many characters I use from the left side, so removing any single character from the string will drop the integer division result down to 11, outputting only Code Bowlin.

\$\endgroup\$
4
  • \$\begingroup\$ Not sure, but I think this can be reduced to DECLARE @ char(12)='Code Bowling'PRINT @ under the rules. \$\endgroup\$
    – MickyT
    Commented Jun 20, 2017 at 23:34
  • \$\begingroup\$ @MickyT It can, does that invalidate my answer? Someone in chat said it only had to withstand removing single random characters, not long arbitrary portions, were they incorrect? \$\endgroup\$
    – BradC
    Commented Jun 21, 2017 at 13:30
  • \$\begingroup\$ I'd leave it here for the moment, It's always good to see an t-SQL answer \$\endgroup\$
    – MickyT
    Commented Jun 21, 2017 at 18:34
  • \$\begingroup\$ @MickyT I'll leave it but cross out the score. Best I could do otherwise is a measly 18 points :P \$\endgroup\$
    – BradC
    Commented Jun 21, 2017 at 18:36
2
\$\begingroup\$

Whitespace, score: 0

[S S T  T   N
_Push_-1_g][S S S T T   S N
Push_6_n][S S S T   N
Push_1_i][S S S T   S S N
_Push_4_l][S S S T  T   T   T   N
_Push_15_w][S S S T T   T   N
Push_7_o][S S T T   S S T   T   S N
_Push_-38_B][S S T  T   S S T   S S S N
_Push_-71_space][S S T  T   T   N
_Push_-3_e][S S T   T   S S N
_Push_-4_d][S S S T T   T   N
Push_7_o][S S T T   S S T   S T N
_Push_-37_C][N
S S N
_Create_Label_LOOP][S S S T T   S T S S S N
_Push_constant_104][T   S S S _Add_top_two][T   N
S S _Print_as_character][N
S N
N
_Jump_to_Label_LOOP]

Letters S (space), T (tab), and N (new-line) added as highlighting only.
[..._some_action] added as explanation only.

Try it online (with raw spaces, tabs and new-lines only).

Uses this Whitespace tip of mine to print the output. The optimal constant 104 is generated by this Java program. Since all the characters (except for the o) are unique, I couldn't use any duplicates or copies to save bytes (copy the value of o would be 1 byte longer than pushing the value of o again).

Score: 117 characters long - 117 whitespace characters = 0
Still better than some of the negative scoring answers. ;)

\$\endgroup\$
1
\$\begingroup\$

CJam, score 47

"'#?GyQ2wE(s6&␟JI!gF$u*Aq;0p4BvOKkHLhM"3/{:i~-z+c}%

Hopefully no problems with this...

Uses one exotic character (Unit Separator, ASCII 31, represented by ␟), and one repeated character ("). I think it could be made longer still, but I'll leave it as is for now.

Try it online!

The program works by taking that long string and splitting it into length-3 substrings. Each substring is then mapped to the block, which converts its characters to their ASCII values, dumps the values on the stack, takes the absolute difference of the second two, adds the result with the first, then converts the final result back to an ASCII character.

\$\endgroup\$
1
\$\begingroup\$

PHP, 33 points

This was quite difficult to come up with.

The score may be inproved in the future.

<?echo IHASZODECG9F^"
'%6z\r+2/.W!";

The newline is assumed to be a Linux-style newline! Windows-style and Old-Mac-Style won't work properly.

\$\endgroup\$
1
\$\begingroup\$

Ruby, 75

Approximately a port of the Python answer, but Ruby doesn't have that cool step function so I use gsub instead. Also I decided to have a little fun with the exotic characters by throwing phrases into Google Translate

Try it online!

print"Cachjkmq\x6fvyzADEFdGHIJKLMeNOPQRST UVWXYZ0B234589[o!?-:;]`w~@\#$%^&l*_+=|><i ă‚łăƒŒăƒ‰ă‚Žăƒ«ăƒ•n ä»ŁçąŒäżéœĄçƒ gÎșωΎÎčÎșός".gsub /(.).{7}/,'\1'
\$\endgroup\$
1
\$\begingroup\$

USML, 12 or 9 points (non-competing)

"Code\tBowling'

Try it online!

This answer cheats a bit by abusing how HTML renders. The string actually created by this is "Code\tBowling ". Points are lost for repeating the "o" character.

For a non-cheatsy answer:

"Code Bowling

USML is still fairly early in development and is not yet capable of increasing the size of the program any further yet.

\$\endgroup\$
6
  • \$\begingroup\$ "USML is still fairly early in development and is not yet capable of increasing the size of the program any further yet.". What about this for 10 points "Code&'Bowling (*Note: Replace & with a line-break, it won't let me type them in comments) \$\endgroup\$
    – Albert Renshaw
    Commented Apr 9, 2017 at 5:50
  • \$\begingroup\$ You can also add a backslash `` infront of any of the letters and it will still output the same string since compiler either ignores it or escapes the character into itself. This gets the (competing) score up to 11 now! \$\endgroup\$
    – Albert Renshaw
    Commented Apr 9, 2017 at 5:53
  • \$\begingroup\$ You can then add a line-break and a lowercase s to the next line (getting a substring of nothing, thus not changing the output at all) to get your competing score up to 12, the same as your non-competing score except an actual valid submission :D \$\endgroup\$
    – Albert Renshaw
    Commented Apr 9, 2017 at 5:55
  • \$\begingroup\$ Infact, here is a 16-point answer in USML, I'll post the hastebin to it since it's hard to type multi-line code in the comments: hastebin.com/icuguviyax.tex \$\endgroup\$
    – Albert Renshaw
    Commented Apr 9, 2017 at 5:56
  • \$\begingroup\$ I'm an idiot and forgot the rules to my own challenge lol, a subset of the code above would still complete the challenge, disqualifying my answer; whoops! \$\endgroup\$
    – Albert Renshaw
    Commented Apr 9, 2017 at 6:06
1
\$\begingroup\$

Cubix, 85

Codeha1spqumtr;$"gnilwoB"Sv"ADEFH%IJK2f!OPUzQ0V3XY&*[-|L:]\T`~#x>MR56cGk'?W<()b4j}.{Z_^/978@

Try it online!

Cubified with insignificant characters replaced with .

        C o d e
        . . . .
        . . u . 
        . . ; . 
" g n i l w o B " S v " . . . .
. . . . . . . ! . . U . . . . .
. . . . . . . L . . \ . . . . .
> . R . . . . . . . W < . . . .
        . . . {
        . . ^ /
        . . . @
        . . . .

I think I have made the path fragile enough that removing characters will break it quite badly.

Watch it run

- 92 characters long
- repeated alnum:       -3 (o)
- repeated punctuation: -4 ("")
- repeated other:       -0 ()
- whitespace characters:  -0 ()
- exotic characters:  -0 ()

Total score: 85
\$\endgroup\$
1
\$\begingroup\$

Zsh --nocaseglob, score 79

>' "%&+,.:<=@ADEGHJKMOQSUVWXYZ^_abfhjkmpqrtuvxyz~'>0
?()${(#)9}*/PRINTF Code\ Bowling;[!] 1 2 3 4 5 6 7 8 `ls|wc -L`

Try it online!

Previous version (score 84):

>\";?()/*/PRINTF %s g${9:8|#0}
rev <([!-+] A D E G H J K L '&,.=@^_`~1234567MOQSUVWXYZabcfhjkmpqtuxyz nilwoB edoC')

Try it online!

Unfortunately, this wasn't irreducible for a number of reasons. Here is the limit of reducibility:

>\";?()/*/PRINTF g$8
rev <([!] A D E G H J K 'nilwoB edoC')

Try it online!

\$\endgroup\$
0
\$\begingroup\$

Acc!!, score -197

119
Write _-52
Write _-8
Count i while i-2 {
	Write _-19+i
}
32
Write _
_+34
Write _
_+45
Write _
_+8
Write _
_-11
Write _
Count i while i-2 {
	Write 105+i*5
}
_-5
Write _

Try it online!

Acc!! works well for this challenge as whitespace is necessary and loops are costly. I made use of the Accumulator here, but poorly, to increase chars. Here is a brief overview from the page:

Accumulator Any expression standing by itself is evaluated and assigned to the accumulator (which is accessible as _). Thus, e.g., 3 is a statement that sets the accumulator to 3; _ + 1 increments the accumulator; and _ * N reads a character and multiplies the accumulator by its charcode. (N gets input)

Write <charcode> Outputs a single character with the given ASCII/Unicode value to stdout. The charcode can be any expression.

Loops in Acc, at least for golfing, are a pain. They require braces, and all whitespace is necessary. Otherwise it's pretty self-explanatory.

\$\endgroup\$
3
  • \$\begingroup\$ This is a bowling challenge, not a golfing one, so you're supposed to maximize score. In addition, its scoring is otherwise unusual. Using the scoring tool above, your code gets a negative score. \$\endgroup\$ Commented Dec 27, 2017 at 23:36
  • 1
    \$\begingroup\$ @ØrjanJohansen It does look as though they are attempting to maximize score (due to "I made use of the Accumulator here, but poorly, to increase chars"), but they're just not scoring it correctly. \$\endgroup\$
    – LyricLy
    Commented Dec 28, 2017 at 8:16
  • \$\begingroup\$ @ØrjanJohansen Ah yes, it seems I completely missed the scoring section. I will update \$\endgroup\$
    – qqq
    Commented Dec 28, 2017 at 17:29

Not the answer you're looking for? Browse other questions tagged or ask your own question.