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
 
60%
+1 −0
Sandbox Label the hinged tetrominoes - [FINALIZED]

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

60%
+1 −0
Challenges Determine if a polyomino is "prime"

Rust, 425 bytes |a:T|a.iter().any(|b|a.iter().any(|c|c!=b&&f(&a,&vec![*b],&vec![*c])));fn g(a:&T,b:&T,c:&T,e:(i8,i8))->bool{[(0,1),(1,0),(-1,0),(0,-1)].iter().an...

posted 2y ago by mousetail‭

Answer
60%
+1 −0
Challenges Encode with ROT13.5

Python 3, 145 bytes lambda s:[dict({chr(i+c):chr((i+13)%26+c)for i in range(26)for c in(65,97)},**{chr(i+48):chr((i+5)%10+48)for i in range(10)}).get(c,c)for c in s] Try it online! Generates...

posted 2y ago by dino‭

Answer
60%
+1 −0
Challenges Lowercase, but not just the letters

C (gcc), 36 bytes f(int*p){for(;*p;putchar(32|*p++));} Try it online! Similar solutions: 36 bytes too but with new lines: f(int*p){for(;*p;*p|=32,puts(p++));} 37 bytes using recursion:...

posted 2y ago by Lundin‭

Answer
60%
+1 −0
Challenges Mediocre pop count

Vyxal, 12 bytes bṠ:₍gGvc†Tİ∑ Try it Online! İ # Index into input T # Indices where v # For each Ṡ # Sum of b # Binary digits ₍gG ...

posted 2y ago by emanresu A‭

Answer
60%
+1 −0
Challenges Repeat the characters

Python 3, 53 38 bytes def f(x,y): for c in x:print(end=c*y) Try it online! I'm sure someone will find a lambda solution to this. Golfed 15 bytes thanks to @Moshi's advice.

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

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

Python 3, 64 62 bytes for i in range(1,101):print("Fizz"*(i%3<1)+"Buzz"*(i%5<1)or i) Try it online! Saved two bytes thanks to Moshi‭ in the comments.

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

Answer
60%
+1 −0
Challenges Reverse an ASCII string

PHP, 32 24 bytes <?=strrev(fgets(STDIN)); Try it online!

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

Answer
60%
+1 −0
Challenges A number adder, not a death adder

PHP, 58 28 bytes P1: <?="<?=\$argv[1]+$argv[1];"; Try it online! Golfed 30 bytes thanks to @Shaggy's advice. P2 (given I inputted 10): <?=$argv[1]+10; Try it online!

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

Answer
60%
+1 −0
Challenges Evens or Odds - you know this one

Rockstar, 44 bytes Outputs 1 for odd or 0 for even. listen to N let M be N/2 turn up M say M*2-N Try it here (Code will need to be pasted in)

posted 3y ago by Shaggy‭

Answer
60%
+1 −0
Challenges Reverse an ASCII string

Rockstar, 67 bytes listen to S split S O's"" while S roll S into C let O be C+O say O Try it here (Code will need to be pasted in)

posted 3y ago by Shaggy‭

Answer
60%
+1 −0
Challenges It's Hip to be Square

PHP, 69 37 bytes <?=($y=sqrt($x=fgets(STDIN)))*$y==$x; Try it online! Golfed 32 bytes thanks to @Shaggy's advice.

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

Answer
60%
+1 −0
Challenges It's Hip to be Square

C (gcc), 40 bytes i;f(n){for(i=1;n>0;n-=i,i+=2);return!n;} Try it online!

posted 3y ago by celtschk‭

Answer
60%
+1 −0
Q&A Tips in golfing using PHP

This is a list of golfing tips for the language known as Philippine Peso PHP. If you have a tip, add it in!

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

Question code-golf tips
60%
+1 −0
Q&A Tips in golfing using PHP

Remove ?> You can save 2 bytes by removing the syntax that ends the PHP script when you don't need it. The program will still work. <?php echo"Hello!"; Try it online!

posted 3y ago by General Sebast1an‭

Answer
60%
+1 −0
Q&A Tips in golfing using PHP

Use <?= It's basically the same as <?php echo. Used on Reverse an ASCII string.

posted 3y ago by General Sebast1an‭

Answer
60%
+1 −0
Q&A Tips in golfing using PHP

Anything that's outside the script is echoed This probably has to deal with the fact that PHP is a script commonly used on HTML, and anything that is written on the HTML document--not inside the s...

posted 3y ago by General Sebast1an‭

Answer
60%
+1 −0
Q&A Tips in golfing using PHP

Whitespace can be removed in between keywords and variables You can easily remove the whitespace that's in-between a keyword (return or a function that doesn't need parentheses) and a variable (ei...

posted 3y ago by General Sebast1an‭

Answer
60%
+1 −0
Challenges Weave Strings Together

Python 3, 91 90 bytes Saved one byte thanks to Mark Giraffe in the comments lambda l:"".join(["".join(x)for x in zip_longest(*l,fillvalue='')]) from itertools import* Try it online!

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

Answer
60%
+1 −0
Sandbox Play dominoes using strings

posted 3y ago by Hakerh400‭

Article code-golf list
60%
+1 −0
Sandbox Reverse your quine [released]

posted 3y ago by General Sebast1an‭  ·  edited 2y ago by trichoplax‭

60%
+1 −0
Challenges Expand a polynomial

JavaScript (Node.js), 60 bytes f=([x,...r],y)=>x?[0,...y=f(r)].map((v,i)=>v-x*(y[i]|0)):[1] Try it online!

posted 3y ago by Moshi‭  ·  edited 6mo ago by Moshi‭

Answer
60%
+1 −0
Challenges Collatz conjecture; Count the tries to reach $1$

Scala, 50 bytes Stream.iterate(_)(x=>Seq(x/2,3*x+1)(x%2))indexOf 1 Try it in Scastie!

posted 3y ago by user‭

Answer
60%
+1 −0
Challenges Collatz conjecture; Count the tries to reach $1$

Ruby, 33 bytes Recursive lambda solution. c=->n{n<2?0:1+c[n%2<1?n/2:n*3+1]} c=->n{ } # c = lambda taking `n` n<2? : # if n...

posted 3y ago by snail_‭

Answer
60%
+1 −0
Challenges Evaluate a single variable polynomial equation

Python 3, 46 bytes lambda a,x:sum(c*x**i for i,c in enumerate(a)) Try it online!

posted 3y ago by Moshi‭

Answer