Post History
#2: Post edited
- The aim of the challenge is to write as long a source code as possible (code bowling), every character typed gives 1 point, using the following rules:
- - **No symbol typed in the source may be re-used twice.** That is, only one `a`, only one `1`, only one `+` and so on.
- - Whitespace characters do not count and may be used multiple times (space, line feed, cr, tab etc).
- - Other non-printable characters may be present but do not count.
- - A standard American keyboard layout/locale is assumed, see [wikipedia](https://upload.wikimedia.org/wikipedia/commons/thumb/5/51/KB_United_States-NoAltGr.svg/600px-KB_United_States-NoAltGr.svg.png).
- No special, local-specific letters are allowed, including `É Ê` etc combinations. Stand-alone `´ ^` etc characters are accepted.- The currency symbols `$ £ €` are accepted.- - No symbols may be present inside string literals. Empty string literals are accepted (if you can manage to type one without using `"` twice).
- - No comments may be present.
- - The program must compile for the given language and run without crashing.
- - No special behavior or input/output is required.
- ---
- Looking for feedback:
- - Is this challenge at all feasible? Too restrictive in too many languages?
- - Should special exceptions be made for very common symbols like `()` and `;`? As in allowing them but they do not count towards the total score?
- Should function-only solutions be allowed? Or maybe it should only ask for function-only solutions?
- The aim of the challenge is to write as long a source code as possible (code bowling), every character typed gives 1 point, using the following rules:
- - **No symbol typed in the source may be re-used twice.** That is, only one `a`, only one `1`, only one `+` and so on.
- - Whitespace characters do not count and may be used multiple times (space, line feed, cr, tab etc).
- - Other non-printable characters may be present but do not count.
- - A standard American keyboard layout/locale is assumed, see [wikipedia](https://upload.wikimedia.org/wikipedia/commons/thumb/5/51/KB_United_States-NoAltGr.svg/600px-KB_United_States-NoAltGr.svg.png).
- - No symbols may be present inside string literals. Empty string literals are accepted (if you can manage to type one without using `"` twice).
- - No comments may be present.
- - The program must compile for the given language and run without crashing.
- - No special behavior or input/output is required.
- ---
- Looking for feedback:
- - Is this challenge at all feasible? Too restrictive in too many languages?
- - Should special exceptions be made for very common symbols like `()` and `;`? As in allowing them but they do not count towards the total score?
- - Should function-only solutions be allowed? Or maybe it should only ask for function-only solutions?
- ---
- **EDIT:**
- I suppose the only allowed characters should be the old school 7 bit ASCII, not counting whitespace characters):
- ```none
- !"#$%&'()*+,-./0123456789:;=>?
- @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
- `abcdefghijklmnopqrstuvwxyz{|}~
- ```
- Meaning that the highest possible score is 93.
- ---
- Example solution (purposely naive) in the C language:
- ```c
- main()
- {
- double cfghjkpqrstvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ = !-1234/5+6*78|90;
- }
- ```
- Score: 74.
- ---
- [Simple test tool](https://tio.run/##ZZFZU4MwFIXf8ysudpRNbd2riDNqrfvWui8PmIQ2iqQSqFbFv16TUKbjCDMwnHtu7nc5eKaD8bDCYhxlhMK6SMkT59FsdwP9ERlXEupzRqBPExYOwMI8FingbpA4IGz0hQBUL2SCkvu5@fqj/xUGkaC5V1bCgEWU@FpVIotTEJgnFHyoeUgqIU8sDxxh@OZDzfRAuK4tZXW2tIeWI2ADTHlPTUkXrPtg/pi2rhYe7dIEjni0R1JZgpIgTTINUFy9RIKE1kRTFw1oZL2I4SClEieLyRpM4od4YloOtMumfPSmcpN/Q/RKrjseUPKMtaJfPXO1tmQ2CrTxtiVVO8OYCmFAWx0rYYiG0UM0T47kGRVCQxZTuNpp7TdvZTaE2qOkrIr@Qkj97teAxWCpHIvERv5h1YEBzxJQVuhSNcipIqTsVuEkPHuKKOCw031@6b0lIu2/fww@N7e2GzvN3b39g8Oj45PTs/NW@@Ly6vrm9k6GaszMzS8sVpfcZWel/r0qM87R0Pby4S8), paste source below "Code" in TIO then check output.
- (Hopefully bug-free, proof-reading is welcomed!)
#1: Initial revision
Code bowling using unique characters
The aim of the challenge is to write as long a source code as possible (code bowling), every character typed gives 1 point, using the following rules: - **No symbol typed in the source may be re-used twice.** That is, only one `a`, only one `1`, only one `+` and so on. - Whitespace characters do not count and may be used multiple times (space, line feed, cr, tab etc). - Other non-printable characters may be present but do not count. - A standard American keyboard layout/locale is assumed, see [wikipedia](https://upload.wikimedia.org/wikipedia/commons/thumb/5/51/KB_United_States-NoAltGr.svg/600px-KB_United_States-NoAltGr.svg.png). - No special, local-specific letters are allowed, including `É Ê` etc combinations. Stand-alone `´ ^` etc characters are accepted. - The currency symbols `$ £ €` are accepted. - No symbols may be present inside string literals. Empty string literals are accepted (if you can manage to type one without using `"` twice). - No comments may be present. - The program must compile for the given language and run without crashing. - No special behavior or input/output is required. --- Looking for feedback: - Is this challenge at all feasible? Too restrictive in too many languages? - Should special exceptions be made for very common symbols like `()` and `;`? As in allowing them but they do not count towards the total score? - Should function-only solutions be allowed? Or maybe it should only ask for function-only solutions?