About

Do I Need to Log in to Play?
No. Submitted solutions will be executed and checked without logging in, but nothing will be saved and you won't appear on the leaderboards.
Is Code Golf Free as in Speech?
Yes! It is written in Go, licensed under MIT, and available on GitHub; patches welcome!
Is Code Golf Free as in Beer?

Yes! However hosting isn't, so if you enjoy Code Golf consider donating to its continued existence and improvement via GitHub Sponsors.

Sponsors will receive a couple of additional perks, with more planned:

* Badge hidden if sponsorship is anonymous.
Free Sponsor
Profile Badge No Yes *
Follow Limit 10 24
What Languages Are Supported?

><>

4.92 MiB
888b90f
github.com/primo-ppcg/fish-jit

Assembly

89.9 MiB
DefAssembler 2.3.1
npmjs.com/package/@defasm/core

AWK

1.72 MiB
5.2.2
gnu.org/software/gawk/

Bash

1.19 MiB
5.2.15
gnu.org/software/bash/

BASIC

205 MiB
FreeBASIC 1.10.0
freebasic.net

brainfuck

4.5 MiB
3bdbd20
github.com/primo-ppcg/bf-jit

C

1.63 MiB
Tiny C Compiler 0.9.27
bellard.org/tcc/

C#

149 MiB
C# 11.0 on .NET 7.0.5
docs.microsoft.com/dotnet/csharp/

C++

118 MiB
14.0.6
clang.llvm.org

COBOL

4.12 MiB
GnuCOBOL 3.1.2.0
gnucobol.sourceforge.io

Crystal

249 MiB
1.8.2
crystal-lang.org

D

296 MiB
D 2.102.2 on LDC 1.32.0
dlang.org

Dart

240 MiB
2.19.6
dart.dev

Elixir

168 MiB
1.14.4
elixir-lang.org

F#

150 MiB
F# 7.0 on .NET 7.0.5
fsharp.org

Fortran

85.6 MiB
GNU Fortran 12.2.0
gcc.gnu.org/fortran/

Go

150 MiB
1.19.9
go.dev
gs

GolfScript

24.2 MiB
6155e9f
http://www.golfscript.com/golfscript/

Haskell

405 MiB
Glasgow Haskell Compiler 9.4.4
haskell.org/ghc/

Hexagony

7.98 MiB
770406a
github.com/SirBogman/Hexagony

J

11 MiB
9.4.21
jsoftware.com

Janet

1.37 MiB
1.28.0
janet-lang.org

Java

51.1 MiB
17.0.1
openjdk.java.net

JavaScript

37.8 MiB
V8 11.3.244.12
v8.dev

Julia

301 MiB
1.9.0
julialang.org

K

526 KiB
c8f24002b1
codeberg.org/ngn/k

Lisp

30.9 MiB
GNU CLISP 2.49.92
clisp.sourceforge.io

Lua

342 KiB
5.4.6
lua.org

Nim

13.6 MiB
1.6.12
nim-lang.org

OCaml

99.2 MiB
5.0.0
ocaml.org

Pascal

30.7 MiB
3.2.2
freepascal.org

Perl

5.34 MiB
5.36.1
perl.org

PHP

10.5 MiB
7.4.33
php.net

PowerShell

176 MiB
PowerShell 7.3.4 on .NET 7.0.5
docs.microsoft.com/powershell/scripting/overview

Prolog

50.9 MiB
SWI-Prolog 8.4.2
swi-prolog.org

Python

74 MiB
3.11.3
python.org

R

76.8 MiB
4.3.0
r-project.org

Raku

68.9 MiB
Raku 6.d on Rakudo 2023.04
raku.org

Ruby

24.1 MiB
3.2.2
ruby-lang.org

Rust

426 MiB
1.69.0
rust-lang.org

sed

232 KiB
4.9
gnu.org/software/sed/

SQL

1.14 MiB
3.42.0
sqlite.org

Swift

484 MiB
5.8
swift.org

Tcl

5.23 MiB
8.6.13
tcl-lang.org

TeX

9.58 MiB
3.141592653
tug.org

V

48.5 MiB
0.3.4
vlang.io

VimL

23.1 MiB
9.0
vim.org

Wren

484 KiB
0.4.0
wren.io

Zig

262 MiB
0.10.1
ziglang.org

If you'd like to see another language added then raise an issue.

Are Warnings Ignored?
Yes. Only STDOUT is checked against the solution, STDERR is however shown back to you to ease debugging.
How Are Arguments Passed to My Program?
Some holes pass arguments, for those your program should read them from the command line arguments (ARGV).
How Are Solutions Ranked?
There are two scorings in use, bytes and chars. Bytes is the number of bytes of a solution encoded in UTF-8. Chars is the number of Unicode codepoints of a solution. Users may submit up to two solutions per hole per language. This is handled automatically when you enter two solutions and each minimizes a different scoring. Each scoring has its own set of leaderboards. For the chars scoring, both “A” (U+0041 Latin Capital Letter A) and “😉” (U+1F609 Winking Face) cost the same despite the 1:4 ratio in byte count in UTF-8.
How Are Solutions Scored?
For each hole, in each language, up to 1,000 points are available. The formula is:
Points = Sb ÷ Su × 1000
Where Su is the length of the user's solution, and Sb is a Bayesian estimator of the form:
Sb = ((√n + 2) ÷ (√n + 3)) × S + (1 ÷ (√n + 3)) × Sa
n is the number of solutions in this hole in this language. S is the length of the shortest solution in this hole in this language. Sa is the shortest solution among all languages in this hole.

The confidence interval is chosen such that the shortest solution in any language will receive a score of at least 750.

Your overall score is the sum of your highest points in each hole.

Are Submissions Resource Constrained?
Yes. Execution time is limited to 5 seconds, CPU & RAM usage is unbounded but this will probably change soon. The length of each solution must be lower than 128 KiB as that's the maximum length of any program argument under Linux.
Is There an API?
An API is currently being developed and documented in standard OpenAPI format. A legacy API that just returns scores in JSON exists. The URL is /scores/all-holes/all-langs/all. Note that all-holes and all-langs may be replaced by the names of specific holes and languages.
Can I See Other People's Solutions?
No, that way all holes stay competitive. If you're stuck on how to shave a couple of strokes off your solution then why not visit our Discord server for some advice.