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.5k posts
 
75%
+4 −0
Challenges Make my number a set

Python 3, 34 bytes f=lambda x:[f(y)for y in range(x)] Try it online! -9 bytes thanks to Moshi Unfortunately, I cannot use Python sets, because sets are unhashable and thus cannot be put int...

posted 3y ago by hyper-neutrino‭  ·  edited 3y ago by hyper-neutrino‭

Answer
75%
+4 −0
Challenges Make my number a set

APL (ngn/apl), 6 bytes {∇¨⍳⍵} Try it online! Dyalog APL and dzaima/APL appear to not give empty vectors for ⍳0, so I used ngn/APL. I don't know how to turn on boxing there, though, so there'...

posted 3y ago by user‭

Answer
75%
+4 −0
Challenges Merge two strings

BQN, 18 bytesSBCS {⊑(⊑𝕨⊸⍷)¨⊸/∾⟜𝕩¨↑𝕨} Run online! A direct translation of Razetime's APL solution (my attempted improvement ⊣∾{⊢´/𝕨⊸«⊸≡¨↑𝕩}↓⊢ turns out to be not at all correct). The BQN solut...

posted 3y ago by Marshall Lochbaum‭

Answer
75%
+4 −0
Challenges Merge two strings

Sed -E, 25 bytes Takes second input, , comma, first input (inputs cannot contain , commas). s/^(.*)(.*),(.*)\1$/\3\2/

posted 3y ago by Wezl‭

Answer
75%
+4 −0
Challenges It's Hip to be Square

Ruby, 16 bytes ->n{n**0.5%1==0} Try it online!

posted 2y ago by snail_‭

Answer
75%
+4 −0
Challenges Coat of Many Colours

JavaScript (Node.js), 153 147 bytes -6 bytes thanks to Shaggy! a=>a.sort((x,y)=>g(x)-g(y),g=x=>"y gree br sc bla oc pe rub ol v f li go ch m cre c s ro a l ru g pu w p o b".split` `.find...

posted 2y ago by Moshi‭  ·  edited 2y ago by Moshi‭

Answer
75%
+4 −0
Sandbox Compute the determinant

posted 2y ago by Moshi‭  ·  edited 2y ago by Moshi‭

Article code-golf math
75%
+4 −0
Challenges Golf a FRACTRAN interpreter

Brachylog, 16 bytes g₂;.z∋zbᵗ×ᵐ/ℤ↰|w Try it online! This is a function submission, which inputs n from the left and A from the right (as a list of two-element lists). Output is to standard out...

posted 2y ago by ais523‭

Answer
75%
+4 −0
Challenges Are All Elements Equal?

Japt, 3 bytes e¡g Try it e¡g :Implicit input of array U e :Is equal to ¡ :Map U g : First element of U

posted 2y ago by Shaggy‭  ·  edited 2y ago by Shaggy‭

Answer
75%
+4 −0
Challenges Are All Elements Equal?

APL (Dyalog Unicode), 3 bytes ⍋≡⍒ Try it online! ⍋ computes the permutation vector that would sort the argument into ascending order ⍒ computes the permutation vector that would sort the ar...

posted 2y ago by Adám‭

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

Instead of the code-golf-tips tag, could we tag "Tips for golfing" questions with tips and code-golf instead? They can still be searched for, so I don't see a reason to make a special tag to repres...

1 answer  ·  posted 2y ago by user‭  ·  edited 2y ago by General Sebast1an‭

Question discussion tags
75%
+4 −0
Challenges Operation "Find The Operator"

C (gcc), 147 151 bytes #define L(X)X(+,a+b)X(-,a-b)X(*,a*b)X(/,b&&a/b)X(%,b&&a%b)X(^,pow(a,b)) #define M(o,d)printf("%s",d==c?#o" ":z++==5?".":""); z;s[99];f(a,b,c){L(M)} Tr...

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

Answer
75%
+4 −0
Sandbox Solve a Word Search!

posted 2y ago by Moshi‭  ·  edited 2y ago by Moshi‭

Article code-golf
75%
+4 −0
Sandbox Find the IP address class [FINALIZED]

posted 2y ago by Razetime‭  ·  edited 11mo ago by trichoplax‭

75%
+4 −0
Challenges Implement Rule 110

[Rule 110] is a Turing complete cellular automaton. It is defined as follows: Take as initial value a sequence of symbols that's infinite to both sides, which consists only of two different symbol...

1 answer  ·  posted 2y ago by celtschk‭  ·  last activity 2y ago by Moshi‭

75%
+4 −0
Challenges Golf golf challenge

C (gcc), 133 131 bytes f(p,s){char*t="Hole in one\0Albatross\0Eagle\0Birdie\0Par\0Bogey\0Double bogey\0Triple bogey";for(--s?s+=5-p:0;s-=!*t++;);puts(t);} Saved two bytes thanks to m90 in the...

posted 2y ago by celtschk‭  ·  edited 2y ago by celtschk‭

Answer
75%
+4 −0
Challenges Golf golf challenge

Ruby, 110 106 bytes Fixed capitalization and refactored for -4. ->p,s{d=s-p s<2&&"Hole in one"||%w[Albatross Eagle Birdie Par Bogey Double Triple][d+3]+(d>1?" bogey":"")} Att...

posted 2y ago by snail_‭  ·  edited 2y ago by snail_‭

Answer
75%
+4 −0
Meta How can we grow this community?

TIO? This community uses Try It Online (TIO) a lot, as do other golfing and programming sites. TIO doesn't host ads, but is some sort of partnership with them possible? What might that look like...

posted 2y ago by Monica Cellio‭

Answer
75%
+4 −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...

6 answers  ·  posted 2y ago by Razetime‭  ·  last activity 2y ago by torres‭

Question code-golf
75%
+4 −0
Challenges Can you give me half?

Embed ESCR, 6 unique characters, 19 bytes [/ [*] [+ [*] [*]]] Each [] pair of brackets encloses an in-line function. The first token in a function is the function name, and subsequent tokens, if...

posted 2y ago by Olin Lathrop‭  ·  edited 2y ago by Olin Lathrop‭

Answer
75%
+4 −0
Challenges Can you give me half?

Ruby, 7 unique, 12 bytes $$.fdiv$$+$$ Ruby, 8 unique, 13 bytes: $$.fdiv $$+$$ Ruby, 9 unique, 22 bytes: "i".size.fdiv"ii".size Ruby, 9 unique, 24 bytes: Math::E./Math::E+Math::E

posted 2y ago by andy‭  ·  edited 2y ago by andy‭

Answer
75%
+4 −0
Challenges Can you give me half?

C (gcc), 8 7 unique cos(cos-cos)/(cos(cos-cos)-(-cos(cos-cos))) Try it online! -1 unique character thanks to @orthoplex‭

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

Answer
75%
+4 −0
Challenges Generate Lewis Caroll's Jabberwocky

The task is to generate the text of Lewis Caroll's Jabberwocky. The text, quoted from Wikipedia, is as follows (I've replaced a non-ASCII character with ASCII, otherwise it's direct copy&paste...

4 answers  ·  posted 3y ago by celtschk‭  ·  last activity 2y ago by General Sebast1an‭

75%
+4 −0
Challenges 1, 2, Fizz, 4, Buzz!

RoadLang, 340 bytes wagwan my slime x is 0 rip dat bong till x bigger den 99 n dat x is x n 1 ayy bossman (x leftova 15) be 0 init bruv man say"FizzBuzz" yeah init bruv ayy bossman (x lef...

posted 3y ago by Razetime‭

Answer
75%
+4 −0
Challenges Calculate a person's age

Challenge Given a date with day, month and year, calculate how old a person born on that day would be today. Input can be in any reasonable format(params, array, date object). Input will never b...

0 answers  ·  posted 3y ago by Razetime‭

Question code-golf date