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 »

Posts by AndrewTheCodegolfer‭

38 posts
85%
+10 −0
Meta Default Rules: Loopholes

Outsourcing the answer to unofficial conditions An example would be a program to print the Fibonacci numbers: instead of actually computing them, it queries an API and gives back its output. Anoth...

posted 3y ago by AndrewTheCodegolfer‭  ·  edited 3y ago by AndrewTheCodegolfer‭

Answer
81%
+7 −0
Meta Default Rules: Loopholes

Interpreting the challenge too literally If the challenge asks that you print the nth prime given input n, a program printing the nth prime given input n isn't allowed.

posted 3y ago by AndrewTheCodegolfer‭

Answer
81%
+7 −0
Meta Default Rules: Code Golf I/O

Functions may take multiple arguments with currying For some languages like Haskell this is almost a necessity, as only one-argument functions exist and multi-argument functions are implemented wi...

posted 3y ago by AndrewTheCodegolfer‭

Answer
81%
+7 −0
Meta Default Rules: Loopholes

Using the lack of features in a language to trivialize the problem For example, in a challenge which requires your program to check if it is connected to the internet, using Brainfuck to always pr...

posted 3y ago by AndrewTheCodegolfer‭

Answer
81%
+7 −0
Challenges Evens or Odds - you know this one

Get ready for a comparatively dry question - this is intended to be one of the "the"s of the code-golfing dictionary. Create a program which inputs a base 10 non-negative whole number (without lea...

16 answers  ·  posted 3y ago by AndrewTheCodegolfer‭  ·  last activity 2y ago by Olin Lathrop‭

81%
+7 −0
Meta Default Rules: Code Golf I/O

Programs may take input from prompts from the GUI For Mathematica, JS, Matlab, et. al. this is the closest thing they have to STDIN.

posted 3y ago by AndrewTheCodegolfer‭

Answer
80%
+6 −0
Meta Default Rules: Code Golf I/O

Regexes may output via the list of matched strings (capture group 0)

posted 3y ago by AndrewTheCodegolfer‭

Answer
80%
+6 −0
Meta Default Rules: Loopholes

Multiple URL shorteners in a web-based challenge In challenges which require fetching data from the Internet, URL shorteners can be problematic. This is because: shorteners made after the cha...

posted 3y ago by AndrewTheCodegolfer‭

Answer
80%
+6 −0
Challenges Versatile self-printer

Using your languages of choice, golf a quine - a non-empty program taking no input and only outputting its source. Here, the win condition is your quine working in the most languages. It should be...

1 answer  ·  posted 3y ago by AndrewTheCodegolfer‭  ·  last activity 3y ago by General Sebast1an‭

80%
+6 −0
Challenges Evens or Odds - you know this one

Regex, 8 bytes [02468]$ Matches strings ending in one of 0, 2, 4, 6, 8. [13579]$ is equivalent but with opposite outputs. Try it on Regex101!

posted 3y ago by AndrewTheCodegolfer‭  ·  edited 3y ago by AndrewTheCodegolfer‭

Answer
80%
+6 −0
Meta Default Rules: Code Golf I/O

In languages without STDIN (eg ///) programs may input through insertion into the source code Also applies to cellular automata, in which the most natural way of taking input is specifying some sp...

posted 3y ago by AndrewTheCodegolfer‭  ·  edited 3y ago by AndrewTheCodegolfer‭

Answer
77%
+5 −0
Meta Default Rules: Loopholes

Using inconsistent I/O An example would be a program whose only two outputs given some input can be 2 and 11. The program is print(11): claiming that it outputs in unary for some outputs and in de...

posted 3y ago by AndrewTheCodegolfer‭

Answer
77%
+5 −0
Meta Default Rules: Loopholes

Optimizing specifically for the given test cases Applies to "code-speeding" or fastest-code where your program must run as quickly as possible, as well as compression challenges. Obviously, there ...

posted 3y ago by AndrewTheCodegolfer‭

Answer
77%
+5 −0
Challenges A number adder, not a death adder

Create a program P1 which takes as input a base 10 number N1 (the numbers for the variables are important). Given N1, P1 will print a program P2. P2 will take as input a base 10 number N2 and outpu...

14 answers  ·  posted 3y ago by AndrewTheCodegolfer‭  ·  last activity 2y ago by torres‭

77%
+5 −0
Meta Default Rules: Code Golf I/O

Turing machines supporting multiple halt states may output with the state they halt on Similar to the exit code submission.

posted 3y ago by AndrewTheCodegolfer‭

Answer
77%
+5 −0
Challenges Create a Sudoku

Write the shortest program that takes no input and outputs a Sudoku solution. For reference, a Sudoku solution is a 9x9 grid of digits where each column, each row and each of the nine 3x3 grids th...

4 answers  ·  posted 3y ago by AndrewTheCodegolfer‭  ·  last activity 3y ago by Shaggy‭

Question code-golf sudoku
77%
+5 −0
Meta How free is "free" for cops and robbers?

I have proposed that we shouldn't use nonfree languages to compete in cops-and-robbers challenges, but this proposal needs some demarcation. Matlab, Stata, LabVIEW all have finite free trials. Bat...

4 answers  ·  posted 3y ago by AndrewTheCodegolfer‭  ·  last activity 3y ago by Razetime‭

77%
+5 −0
Challenges Guess the language! (Cops' Thread)

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/Eso...

16 answers  ·  posted 3y ago by AndrewTheCodegolfer‭  ·  last activity 3y ago by Shaggy‭

77%
+5 −0
Meta Default Rules: Loopholes

Using a non-free (beer) language on a cops-and-robbers challenge For a discussion on what counts as "free", see this post. Cops-and-robbers challenges have two components: a cop posts a program o...

posted 3y ago by AndrewTheCodegolfer‭  ·  edited 3y ago by Moshi‭

Answer
75%
+7 −1
Meta Default Rules: Code Golf I/O

Programs may output via exit code Exit codes are to programs what return values are to functions, so it makes sense that exit codes would be allowed.

posted 3y ago by AndrewTheCodegolfer‭

Answer
75%
+4 −0
Meta Default Rules: Loopholes

Abusing native number types It's common to restrict inputs, outputs, intermediate algorithm values, etc. to fit into the native number type of the language. This can be a problem for languages li...

posted 3y ago by AndrewTheCodegolfer‭  ·  edited 3y ago by AndrewTheCodegolfer‭

Answer
75%
+4 −0
Meta Default Rules: Code Golf I/O

Numerical I/O may be given as a character code Input 64 may be given as @ instead. This mostly exists for languages like Brainfuck that only take input through character codes.

posted 3y ago by AndrewTheCodegolfer‭  ·  edited 3y ago by AndrewTheCodegolfer‭

Answer
75%
+4 −0
Meta Default Rules: Loopholes

Storing information in the platform specs We should disallow requiring the program to be run on some platform to store information for the challenge. An extreme example would be Nullary, in which ...

posted 3y ago by AndrewTheCodegolfer‭

Answer
75%
+4 −0
Meta How free is "free" for cops and robbers?

Free access must not be finite There has to be a time-unlimited, free way to run the language in question.

posted 3y ago by AndrewTheCodegolfer‭  ·  edited 3y ago by AndrewTheCodegolfer‭

Answer
75%
+4 −0
Meta How free is "free" for cops and robbers?

Languages with free online interpreters are free This includes all languages currently on tio.run, for example.

posted 3y ago by AndrewTheCodegolfer‭

Answer