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 »

Search

Advanced Search Options

To further refine your search, you can use additional qualifiers such as score:>0.5. For example, the search score:>=0.5 created:<1y grammar would return only posts mentioning "grammar" that have a score >= 0.5 and were created less than a year ago.

Further help with searching is available in the help center.

Quick hints: tag:tagname, user:xxx, "exact phrase", post_type:xxx, created:<N{d,w,mo,y}, score:>=0.5

Filters
1.6k posts
 
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
Challenges Add two negabinary integers

About Negabinary Negabinary means base negative two (-2). That is, the $n$th place value is determined by $(-2)^n$. Negabinary numbers can be evaluated just like any other base system. For exampl...

3 answers  ·  posted 3y ago by Moshi‭  ·  last activity 3y ago by Shaggy‭

Question code-golf math
77%
+5 −0
Meta How do we handle standardizing things?

Update: the meta tag is live, so we can start the posts. I have created a few here with a few sample answers, but the rest is up to the community! Make sure to vote on other answers as well as post...

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

Answer
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
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
77%
+5 −0
Meta Default Rules: Flags and Other Compile-Time Options

How should we deal with flags / command line options when scoring entries?

2 answers  ·  posted 3y ago by Moshi‭  ·  last activity 3y ago by Quintec‭

Question default-rules
77%
+5 −0
Meta Default Rules: Libraries

How should we deal with golfing libraries when scoring entries? Continuation of Is my extension-like library allowed to be used in answers?, the answer to that question seems to be a "yes", now we...

1 answer  ·  posted 3y ago by Moshi‭  ·  edited 3y ago by Quintec‭

Question default-rules
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
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
Meta Is it good practice to change the names of variables in challenges?

Yes Unless the challenge tells you what to name your function, you're free to use anything. This means that single character names are usually the best option. Note that anonymous function submis...

posted 3y ago by Moshi‭

Answer
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
Q&A What's a code bowling challenge?

It's the opposite of code golf. Code bowling is essentially a challenge where you try to write the longest code possible, as opposed to the shortest code. Now, this format comes with many issues, ...

posted 3y ago by Quintec‭

Answer
77%
+5 −0
Challenges Gamer Meme Creator

Challenge You will be given a string and an ascii art as input. The string must be placed above the ascii art, and centered based on its longest line. The text BOTTOM TEXT must be placed below...

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

77%
+5 −0
Q&A Getting started with making (and/or solving) KOTH challenges

I have seen KOTH (King of the Hill) challenges before but it's still unclear to me how to properly make, or even play, such challenge. To get started, how do I make (or solve) KOTHs? An answer cou...

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

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

Cracks Shaggy‭'s answer Let the cops be "Cops" The conjunction is " and " The robbers are "Robbers" Say the cops with the conjunction with the robbers It can be one of: FALSE Phooe...

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

Answer
77%
+5 −0
Challenges It's Hip to be Square

Python 3, 20 19 bytes lambda n:n**.5%1==0 -1 byte thanks to @shaggy : 0.5 -> .5 Try it online!

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

Answer
77%
+5 −0
Challenges 99 Shortened Bottles of Beer

Disclaimer This challenge also exists in CGCC, but if you want to compete here (too), then hop in! Challenge Recreate "99 Bottles of Beer on the Wall", using the least bytes possible. Lyrics: ...

13 answers  ·  posted 3y ago by General Sebast1an‭  ·  last activity 3y ago by General Sebast1an‭

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

You may modify the input in-place If a function takes an input a, it is acceptable that a contains the intended output after executing instead of other forms of output. Note that this means a must...

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

Answer
77%
+5 −0
Sandbox Repeat the characters [FINALIZED]

posted 3y ago by celtschk‭  ·  edited 1y ago by trichoplax‭

77%
+5 −0
Challenges Make $2 + 2 = 5$

C (gcc), 30 bytes f(x,y){return x+y|!(x^y|x^2);} Try it online! In case the "preferably on a function" requirement can be dropped, then #define f(x,y)x+y|!(x^y|x^2) is 28 bytes.

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

Answer
77%
+5 −0
Challenges Evaluate a single variable polynomial equation

Haskell, 20 bytes f x=foldl((+).(x*))0 Try it online! Takes input coefficients from highest degree to lowest. 21 bytes x%(h:t)=h+x*x%t x%_=0 Try it online!

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

Answer
77%
+5 −0
Challenges "Hello, World!"

Common Lisp, 26 22 bytes (princ"Hello, World!") -4 bytes thanks to @Sisyphus‭ Try it online!

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

Answer
77%
+5 −0
Challenges Evaluate a single variable polynomial equation

Ruby, 50 bytes def f(k,x)k.length>1?k[0]+f(k[1..-1],x)*x:k[-1]end Try it online! This uses the Horner's method recursively, because I think it'll be slightly shorter than using a loop or bu...

posted 4y ago by luap42‭

Answer
77%
+5 −0
Challenges Print the Great Numeric Pyramid

JavaScript (Node.js), 137 136 117 bytes with(Math)f=n=>(m=(a,b)=>a?m(--a,b)+b(a):[])(28,y=>m(55,x=>x>26-y&x<y+28&(x^y)?min(abs(abs(27-x)-y)/2,27-y):' ')+` `) Try it...

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

Answer