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
 
80%
+6 −0
Challenges Evens or Odds - you know this one

Python 3, 10 bytes 1 .__and__ Try it online! Returns 1 for odd numbers and 0 for even numbers. Two bytes shorter than the trivial lambda x:x%2 and one byte shorter than the equivalent magic...

posted 4y ago by hyper-neutrino‭

Answer
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 4y ago by AndrewTheCodegolfer‭  ·  edited 4y ago by AndrewTheCodegolfer‭

Answer
80%
+6 −0
Meta Leaderboards are live

You might have noticed that challenges now show a leaderboard in addition to the table of contents. This is something this community has wanted for a while, and now, thanks to user contributions a...

4 answers  ·  posted 4y ago by Monica Cellio‭  ·  last activity 4y ago by user‭

Question discussion
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 4y ago by AndrewTheCodegolfer‭  ·  last activity 3y ago by General Sebast1an‭

Question quine number highest-score
80%
+6 −0
Meta Is my extension-like library allowed to be used in answers?

Yes, including the fact that it's in C. Using a heading such as "C + BMPL" that links to the library and explains what it does should be fine. I also think that having a way to run it (preferably ...

posted 4y ago by Quintec‭

Answer
80%
+6 −0
Meta Should [code-golf-tips] be replaced with [tips] + [code-golf]?

Yes tips is a sort of prefix tag, and code-golf-tips is a superfluous tag. I think it it worth keeping them separate because tips is already very flexible.

posted 3y ago by Razetime‭  ·  edited 3y ago by General Sebast1an‭

Answer
80%
+6 −0
Challenges Are All Elements Equal?

Zsh, 8 bytes >$@ <^$1 Attempt This Online! Outputs via exit code: 0 for not all the same; 1 for all the same >$@: create a file named for each element in the input effectively de...

posted 3y ago by pxeger‭

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

Since there have been some discussions about the use of GCC extensions, I decided to make a default-rules post about it. How should we deal with compiler extensions to languages?

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

Question default-rules
80%
+6 −0
Challenges Create an Alphabet Diamond

Brain-Flak, 250 bytes ((((()()()){}){}){}()){(({})[()])}{}(<>)<>{({}<>)<>}<>{(({})[()])}([]){{}([(({}))](((()()()){}){}){}()){({}[()])<>((((()()()()){}){}){})&l...

posted 4y ago by DJMcMayhem‭

Answer
80%
+6 −0
Challenges Is it a near-anagram?

Two words are anagrams of each other if the letters of one can be reordered to spell the other; e.g. ADOBE and ABODE are anagrams. An alternate way of describing it is that both words contain the s...

5 answers  ·  posted 4y ago by snail_‭  ·  edited 3y ago by General Sebast1an‭

Question code-golf string
80%
+6 −0
Challenges Word Set Square

APL (Dyalog Unicode), 23 bytes Anonymous tacit prefix function. Reuires 0-based indexing (⎕IO←0) (⊢⍪⍨¯1↓⊢,∘↑-∘⍳∘≢↑¨⊢)⊢,⌽ Try it online! ⌽ reverse the argument ⊢, prepend the argument (…) ...

posted 4y ago by Adám‭

Answer
80%
+6 −0
Challenges Beaver Code Decryption

Credit This challenge is taken with permission from https://www.mysterytwisterc3.org/en/challenges/level-1/beaver-code Description The encryption method is as follows: The plaintext is divided ...

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

Question code-golf encryption decryption
80%
+6 −0
Challenges Weave Strings Together

Jelly, 2 1 byte Z Try it online! -1 byte thanks to Razetime! Full program How it works Z - Main link. Takes a list L on the left Z - Transpose Implicitly print, smashing lists togethe...

posted 4y ago by caird coinheringaahing‭  ·  edited 4y ago by caird coinheringaahing‭

Answer
80%
+6 −0
Challenges Golf a FRACTRAN interpreter

APL (Dyalog Unicode), 33 bytes {×x←⊃(2⌷⍵)(÷⍨(/⍨)0=|)⍺×1⌷⍵:x∇⍵⋄⍺} Try it online! The first case doesn't work because it gets really big, but the other two do. The input is taken on the left a...

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

Answer
80%
+6 −0
Challenges Juggler sequences

A Juggler sequence is a sequence that begins with a positive integer $a_0$ and each subsequent term is calculated as: $$a_{k+1} = \begin{cases} \left \lfloor a_k ^ \frac 1 2 \right \rfloor, &...

9 answers  ·  posted 4y ago by caird coinheringaahing‭  ·  last activity 3y ago by Shaggy‭

Question code-golf math number sequence
80%
+6 −0
Challenges Juggler sequences

BQN, 17 bytesSBCS {𝕩∾1𝕊⍟≠⌊𝕩⋆2|𝕩+÷2} Run online! BQN primitives alone can't express unbounded iteration, so this must be a recursive block function. {𝕩∾1𝕊⍟≠⌊𝕩⋆2|𝕩+÷2} # Function 𝕊 taking argu...

posted 4y ago by Marshall Lochbaum‭

Answer
80%
+6 −0
Challenges Juggler sequences

Jelly, 7 bytes *Ḃ×½ḞµƬ *Ḃ×½ḞµƬ *Ḃ input ^ (input % 2) ×½ multiply sqrt(input) Ḟ floor µƬ iterate until converged and collect results Try it online!

posted 4y ago by rak1507‭

Answer
80%
+6 −0
Challenges Display a Progress Bar

The goal of this challenge is simple: given a ratio of whole numbers, output a 50-character long progress bar representing the ratio. Rules Input Your program must take two numbers as input. T...

7 answers  ·  posted 5mo ago by Sylvester‭  ·  last activity 1mo ago by panadestein‭

Question code-golf
80%
+6 −0
Challenges Source with the whole alphabet in order of appearance

Vyxal, 27 bytes QabcdefghijKlmnopqrstUvwxyz Try it Online! Works by exiting straight away. The joys of a language where every letter is a built-in function. Explained QabcdefghijKlmnopqrstUv...

posted 6mo ago by lyxal‭

Answer
80%
+6 −0
Meta Reactions on Code Golf Codidact

None of these are applicable at least not for Code Golf challenges. I think this community should "opt out" of reactions unless we can come up with more relevant ones. "Works for me". Answers ...

posted 3y ago by Lundin‭

Answer
80%
+6 −0
Challenges Golf golf challenge

The task is to create a program which displays a golf score as text. It takes 2 numbers as input, separated by space or new line: The first number is the par of the specific hole. The second nu...

5 answers  ·  posted 3y ago by Lundin‭  ·  last activity 3y ago by radarek‭

Question code-golf
80%
+6 −0
Challenges Find the IP address class

Task Given an IP address as a string, find its IP address class. For reference, here is a table: Class Leadingbits Numberof networks Addressesper network Total addressesin class Start...

8 answers  ·  posted 3y ago by Razetime‭  ·  last activity 4mo ago by Lundin‭

Question code-golf
80%
+6 −0
Challenges Keyword golfing

Many programming languages have the concept of keywords, special syntax items that are not just identifiers reserved by some library, but words reserved by the language itself. The challenge is to...

6 answers  ·  posted 3y ago by Lundin‭  ·  last activity 1y ago by H_H‭

Question code-golf
80%
+6 −0
Challenges Digit Sum Integer Sequence (working title)

Inspired by this challenge. If anyone has any suggestions for a song title I could use for the challenge title then please leave a comment. Definition We define f(x) for a given integer as the su...

7 answers  ·  posted 3y ago by Shaggy‭  ·  last activity 11mo ago by xrs‭

Question code-golf sequence
80%
+6 −0
Meta Can we have [popularity-contest]s?

Well... maybe not in combination with a code golf challenge, but more like an artistic challenge with some theme, similar to screenshot of the month? For reference see for example Outdoors photo co...

posted 3y ago by Lundin‭

Answer