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 »
Challenges

Comments on Guess the language! (Cops' Thread)

Parent

Guess the language! (Cops' Thread)

+5
−0

ROBBERS' THREAD

A famous cops-and-robbers challenge whose source shall remain unnamed is brought to Codidact.

You are a cop. You should write a program in a "famous" (has an English Wikipedia/Esolangs/Rosetta Code page) language that prints Cops and Robbers. That's all it does - prints exactly this stream of bytes, with optional trailing output if your language absolutely has to make it.

Don't assume REPLs, existing boilerplate or nonstandard flags. If your code has bytes outside printable ASCII range, it should have a hexdump available.

Do not, and I repeat, do not edit the source of your program after posting. You might want to make your program polyglot-free.

Your goal is to be the writer of the shortest program whose language still hasn't been determined after 2 weeks or 14 days. If your program isn't cracked by then, you may choose to reveal the language yourself.

Good luck, all!

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

1 comment thread

Robbers' Challenge? (3 comments)
Post
+3
−0

C or C++ (gcc) 220 bytes, cracked by Razetime

%:
%: define cops(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t) if(not false and k%:%:f%:%:d%:%:l(& (not true) <:%:i%:j%:k%:l" "%:m" "%:n%:o%:p%:q%:r%:s%:t:> ))<%%>
%:
main()<%cops(w,h,a,t,s,u,p,?,C,o,p,s,and,R,o,b,b,e,r,s)%>

Try it online!

Output:

Cops and Robbers

Some explanation/de-obfuscation:

  • %: is a digraph equivalent to #. <% and %> are digraph equivalents to { and }. <: and :> are digraph equivalents to [ and ].
  • # on an empty line is allowed but does nothing.
  • not and and are alternative operators from iso646.h here used to make it look more like other languages. The boolean stuff is mostly there to confuse.
  • Using stringification # and token concatenation ##, the macro expands to:
    if(!false and puts(&[not true]"Cops and Robbers")<%%>
  • Removing obfuscation this is basically just puts("Cops and Robbers").
History
Why does this post require moderator attention?
You might want to add some details to your flag.

1 comment thread

Cracked: [C++](https://tio.run/##Hc7dasMwDAXg@z6FaNGI6dl2L0J2sTfoGzj@ad06jhs77PEzJwgOkhDoMzl/3o3ZLiGZ... (2 comments)
Cracked: [C++](https://tio.run/##Hc7dasMwDAXg@z6FaNGI6dl2L0J2sTfoGzj@ad06jhs77PEzJwgOkhDoMzl/3o3ZLiGZ...
Razetime‭ wrote over 2 years ago

Cracked: C++. Please do not omit header files, you need to include the entirety of the program required to run without errors, since it's not code golf.

Lundin‭ wrote over 2 years ago

Headers would have given it away, it was already quite easy 🙂 The answer is C or C++. Compiles with gcc default settings. C++ does not need iso646.h I believe.