Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Sandbox

Code bowling using unique characters

+1
−0

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.
  • 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):

 !"#$%&'()*+,-./0123456789:;=>?
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
`abcdefghijklmnopqrstuvwxyz{|}~

Meaning that the highest possible score is 93.


Example solution (purposely naive) in the C language:

main()
{
  double cfghjkpqrstvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ = !-1234/5+6*78|90;
}

Score: 74.


Simple test tool, paste source below "Code" in TIO then check output.

(Hopefully bug-free, proof-reading is welcomed!)

History
Why does this post require moderator attention?
You might want to add some details to your flag.

3 comment threads

Possible variation to allow character exeptions (1 comment)
Feedback (1 comment)
C is trivial (2 comments)