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

Post History

50%
+0 −0
Sandbox The Palindrome Challenge

posted 4y ago by luap42‭  ·  edited 4y ago by luap42‭

#2: Post edited by user avatar luap42‭ · 2020-11-15T16:20:13Z (about 4 years ago)
  • Your task is to write a program, which is palindromic. This means, that you can reverse it's source code and will get the exact same source code.
  • I don't care, what your program does, as long as it
  • * does something visible to the user (like outputting something or creating a file)
  • * doesn't do anything harmful.
  • Your program must consist of at least one character/byte (whatever your language uses).
  • ## Scoring
  • Take **B** the number of bytes and **U** the number of bytes that will be "used" in one execution of your program (excluding, for example, unreachable branches or comments). Now your score is:
  • $$\frac{U^2}{B}$$
  • The program with the *highest* score in any language wins. This scoring system should favor longer programs while penalizing programs with a lot of "unexecutable stuff" in between. Ideally, every character would be part of the executed code.
  • ----
  • What do you think of this challenge suggestion? Do you think the scoring criterion is good for this challenge?
  • Your task is to write a program, which is palindromic. This means, that you can reverse it's source code and will get the exact same source code.
  • I don't care, what your program does, as long as it
  • * does something visible to the user (like outputting something or creating a file)
  • * doesn't do anything harmful.
  • Your program must consist of at least one character/byte (whatever your language uses). If your chosen language defaults to outputting every character, unless certain "control sequences" are given (such as PHP or HTML for example), your program must have at least one of those sequences if you want to make use of that feature, otherwise you can assume that the correct control sequences have been put around your source code.
  • ## Scoring
  • Take **B** the number of bytes and **U** the number of bytes that will be "used" in one execution of your program (excluding, for example, unreachable branches or comments). Now your score is:
  • $$\frac{U^2}{B}$$
  • The program with the *highest* score in any language wins. This scoring system should favor longer programs while penalizing programs with a lot of "unexecutable stuff" in between. Ideally, every character would be part of the executed code.
  • ----
  • What do you think of this challenge suggestion? Do you think the scoring criterion is good for this challenge?
#1: Initial revision by user avatar luap42‭ · 2020-11-15T16:10:20Z (about 4 years ago)
The Palindrome Challenge
Your task is to write a program, which is palindromic. This means, that you can reverse it's source code and will get the exact same source code.

I don't care, what your program does, as long as it

* does something visible to the user (like outputting something or creating a file)
* doesn't do anything harmful.

Your program must consist of at least one character/byte (whatever your language uses).

## Scoring

Take **B** the number of bytes and **U** the number of bytes that will be "used" in one execution of your program (excluding, for example, unreachable branches or comments). Now your score is:

$$\frac{U^2}{B}$$

The program with the *highest* score in any language wins. This scoring system should favor longer programs while penalizing programs with a lot of "unexecutable stuff" in between. Ideally, every character would be part of the executed code.

----

What do you think of this challenge suggestion? Do you think the scoring criterion is good for this challenge?