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

Mathematica, 4 bytes OddQ Not at all my code - this is the original post by Martin Ender. Prints True for odd inputs and False for even inputs.

posted 4y ago by AndrewTheCodegolfer‭

Answer
66%
+2 −0
Challenges Create a Sudoku

BQN, 11 9 bytesSBCS Run online! 1⌽⍟⊢⍋3|↕9 The result is a length 9 list of lists using the numbers 0 to 8. The solution is based on the 3x3 transpose list 036147258, obtained with Grade Up. T...

posted 4y ago by Marshall Lochbaum‭  ·  edited 4y ago by Marshall Lochbaum‭

Answer
66%
+2 −0
Meta Leaderboards are live

Adding display:flex; align-items:center to .toc--full items centers the names and code samples vertically, which I think looks a little better.

posted 4y ago by Marshall Lochbaum‭

Answer
66%
+6 −2
Challenges Multiply complex numbers.

Multiply complex numbers. 2 space-seperated ones will be input, as follows: (update: you can replace i with j or some other symbol if needed) a+bi -a+bi a-bi -a-bi where a and b are integers ...

7 answers  ·  posted 4y ago by heav‭  ·  last activity 2y ago by __blackjack__‭

Question code-golf math
66%
+2 −0
Challenges "Hello, World!"

///, 13 bytes Hello, World! Someone had to. 18 bytes using replacement /x/H/xello, World! 23 bytes using two-layer replacement /a/Hello, World!//b/a/b a is replaced with Hello, World! ...

posted 4y ago by AndrewTheCodegolfer‭

Answer
66%
+2 −0
Meta Is my extension-like library allowed to be used in answers?

I'm not a golfer, I know, but I do have wanted to make a programming language back then. The name is BMPL (Builder's Multi-Purpose Language) and is currently a library I made in C (clang). It's not...

2 answers  ·  posted 4y ago by General Sebast1an‭  ·  last activity 11mo ago by Timwi‭

Question support discussion answering language
66%
+2 −0
Challenges Shuffle a subset of a list

Jelly, 7 bytes œPżịẊ¥F Try it online! Takes the 1-indexed indices on the left and the list on the right How it works œPżịẊ¥F - Main link. Takes I on the left and L on the right œP - Pa...

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

Answer
66%
+2 −0
Challenges Shuffle a subset of a list

JavaScript (Node.js), 75 68 bytes -7 bytes thanks to Hakerh400 (a,b)=>b.map(i=>[a[i],a[j]]=[a[j=b[Math.random()*b.length|0]],a[i]]) Try it online! Basic random swap algorithm. Unfortuna...

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

Answer
66%
+2 −0
Challenges Coat of Many Colours

C, 534 bytes Strictly conforming program. #include <stdio.h> #include <stdlib.h> #include <string.h> char i=1,**c,**d,*t[30]={"red","yellow","green","brown","scarlet","blac...

posted 3y ago by Lundin‭

Answer
66%
+2 −0
Challenges Are All Elements Equal?

brainfuck, 40 bytes Outputs ÿ if all elements are equal, and \x00 byte otherwise. ->,>,[[-<->>+<]<[-<[-]>]>>[-<<+>>]<,]<<. Try it online! ...

posted 3y ago by Hakerh400‭

Answer
66%
+2 −0
Challenges Recreate the Stack Overflow logo

HTML + CSS, 29 + 677 (706) bytes HTML: <div id="S"><div></div></div> CSS: #S{box-sizing:border-box;position:relative;display:block;height:192px;width:163px;}#S div{pos...

posted 3y ago by Kevin M. Mansour‭

Answer
66%
+2 −0
Challenges It's Hip to be Square

Husk, 5 bytes ±£Θİ□ Try it online! similar to haskell, checks if the number is in the infinite list of squares.

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

Answer
66%
+2 −0
Q&A How to add lots of command line arguments to https://tio.run?

I have a question about everyone's favourite Code Golf editor https://tio.run. After picking a language, is there a sensible way to enter command line arguments to it, other than adding them manual...

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

Question code-golf try-it-online command-line-arguments ide
66%
+2 −0
Challenges Caesar shift cipher

C (gcc), 112 bytes Function solution. p,*a;f(char*s,int n){a=strdup(s);for(s=a;*s;s++)(p=isalpha(*s)?(*s&96)^96?65:97:0)&&(*s=(*s-p+n)%26+p);puts(a);} Try it online! Explanati...

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

Answer
66%
+2 −0
Challenges Word Set Square

JavaScript, 102 bytes s=>[...x=s.split``].concat(x.reverse()).reduce((l,c,i,a)=>l+` `+(a[i+1]?c+' '.repeat(i-1)+c:a.join``)) The first part creates the 'mirrored' string in an array. red...

posted 3y ago by m90‭

Answer
66%
+2 −0
Challenges Juggler sequences

JavaScript, 37 32 bytes Outputs a comma delimited string. f=n=>n-1?n+[,f(n**(.5+n%2)|0)]:n Try it online!

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

Answer
66%
+2 −0
Challenges Word Set Square

Ruby, 74 bytes Full program: s=gets+$_.reverse puts [s[0]]+s[1..-2].chars.zip(0..).map{_1+' '*_2+_1}<<s Note that this is not fit for interactive use because it looks weird when you inp...

posted 3y ago by Wezl‭

Answer
66%
+2 −0
Challenges Juggler sequences

Japt, 17 bytes Needs some more work. É?[U]cßÂUp½+Uu:1ì Try it If there's a proof that the length of the sequence for any given n never exceeds n**3 then ... Japt, 14 bytes NcU³Æ=Âp½+UuÃâ ...

posted 3y ago by Shaggy‭

Answer
66%
+2 −0
Challenges Reduce over the range [1..n]

Japt, 4 bytes Takes the operator as a string but would also work without modification using a function by assigning it to variable V. That can be done in the header by leaving a blank line and the...

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

Answer
66%
+2 −0
Challenges Coat of Many Colours

C (gcc), 301 bytes Function taking in an array of null-terminated strings and the array's length. #include <string.h> #include <stdlib.h> char*s="edellowreenrowncarletlackchreachuby...

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

Answer
66%
+2 −0
Challenges Reduce over the range [1..n]

JavaScript, 25 bytes The function is called with f(g)(n), where g is a function. g=>h=n=>n-1?g(h(n-1),n):1 Try it online!

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

Answer
66%
+2 −0
Challenges Reduce over the range [1..n]

Python 2, 33 bytes lambda a,b:reduce(a,range(1,1+b)) Try it online! Or, without using the reduce built-in: Python 2, 37 bytes f=lambda a,b:b-1and a(f(a,b-1),b)or 1 Try it online!

posted 3y ago by hyper-neutrino‭

Answer
66%
+2 −0
Challenges Evaluate a single variable polynomial equation

Python 3, 46 bytes f=lambda p,x,a=0:p and f(p[1:],x,a*x+p[0])or a Try it online! Takes input reversed.

posted 3y ago by user‭

Answer
66%
+2 −0
Challenges Reduce over the range [1..n]

APL (Dyalog Unicode), 4 bytes ⎕/⍳⎕ Try it online! ⎕ input / reduction over ⍳ the integers until ⎕ input.

posted 3y ago by Adám‭  ·  edited 3y ago by Adám‭

Answer