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
 
66%
+2 −0
Challenges It's Hip to be Square

C (gcc), 57 64 bytes x,s;main(){scanf("%d",&x);s=sqrt(x);printf("%d",s*s==x);} Try it online!

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

Answer
66%
+2 −0
Challenges 99 Shortened Bottles of Beer

Scala, 242 bytes _=>99 to(1,-1)map{b=>s"${w(b)} on the wall, ${w(b)}. \n${if(b>1)"Take one down and pass it around"else "Go to the store and buy some more"}, ${w((b+97)%99+1)} on the w...

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

Answer
66%
+2 −0
Challenges 99 Shortened Bottles of Beer

Haskell, 221 215 bytes f=a 99 (#)=(++) a n=d n#", "#c".\n"n#b(n-1) b 0="Go to the store and buy some more, "#d 99#"." b n="Take one down and pass it around, "#d n#".\n\n"#a n c m n=show n#"...

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

Answer
66%
+2 −0
Challenges Guess the language! (Robbers' Thread)

Cracks Shaggy's answer: Japt ((Cops)&(Robbers))`¬ps „d žbÞ`¸ËhDÎmEgviuø Test it

posted 3y ago by Razetime‭

Answer
66%
+2 −0
Challenges Guess the language! (Robbers' Thread)

Cracks Lundin's answer: C++ (gcc) %: %: define cops(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t) if(not false and k%:%:f%:%:d%:%:l(& (not true) <:%:i%:j%:k%:l" "%:m" "%:n%:o%:p%:q%:r%:s%:t:&...

posted 3y ago by Razetime‭

Answer
66%
+2 −0
Challenges Guess the language! (Robbers' Thread)

Cracks Shaggy's answer, brainfuck, 245 bytes void main(x,y)->{ printf=io.write(z=x-y); printf("+++++[++++>---<]>.+[--->+<]>+++.+.+++.+[---->+<]>+++.[->+++<]&g...

posted 3y ago by Aaron Miller‭

Answer
66%
+2 −0
Challenges 99 Shortened Bottles of Beer

C (gcc), 232 bytes f(n,w,p){printf("%i bottle%s of beer%s%s",n,"s"+(n<2)," on the wall"+w,p);}main(i){for(i=99;i;){f(i,0,", ");f(i,12,".\n");printf(i>1?"Take one down and pass it around, "...

posted 3y ago by celtschk‭

Answer
66%
+2 −0
Challenges 99 Shortened Bottles of Beer

C (gcc), 244 bytes main(){for(char*w=" bottles of beer on the wall",i=100;--i;)printf("%d%.*s%s, %d%.*s%.8s.\n%s, %d%.*s%s.\n\n",i,i-1?8:7,w,w+8,i,i-1?8:7,w,w+8,i^1?"Take one down and pass it ar...

posted 3y ago by Lundin‭  ·  last activity 3y ago by Lundin‭

Answer
66%
+2 −0
Challenges Multiply two strings

Japt -m, 5 bytes Takes input in reverse order. Sadly, Japt has no minimum built-in for strings. VcmUc Try it VcmUc :Implicit map of each U in the first input string V :Second inp...

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

Answer
66%
+2 −0
Challenges Multiply two strings

JavaScript, 37 bytes I/O as character arrays. a=>b=>b.flatMap(x=>a.map(y=>x<y?x:y)) Try it online!

posted 3y ago by Shaggy‭

Answer
66%
+2 −0
Challenges In The Jailhouse Now

Scala, 90 89 88 bytes Saved 2 bytes thanks to Shaggy n=>1 to n map{x=>val s=if(x<2)"╔╦╗"else if(x<n)"╠╬╣"else"╚╩╝";s(0)+(""+s(1))*(n-3)+s(2)} Try it in Scastie! I feel like there'...

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

Answer
66%
+2 −0
Challenges In The Jailhouse Now

Python 3, 74 bytes lambda n:"╔"+"╦"*(n-3)+"╗\n"+("╠"+"╬"*(n-3)+"╣\n")*(n-2)+"╚"+"╩"*(n-3)+"╝" Try it online!

posted 3y ago by bastolski‭

Answer
66%
+2 −0
Challenges In The Jailhouse Now

C (gcc), 119 118 116 115 bytes #define p(x,y,z) printf(i^1?i^c?#z:#y:#x) i,j;f(c){for(i=1;i<=c;p(╗\n,╝\n,╣\n),i++)for(j=p(╔,╚,╠);j++<c;)p(╦,╩,╬);} Try it online! Function solution. I...

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

Answer
66%
+2 −0
Challenges My house is destroyed! Can you make me one?

Ruby, 33 bytes ->n{?#*n+(' #'+' '*(n-2)+?#)*~-n} Try it online! Basically the same as moshi's python (developed parallelly).

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

Answer
66%
+2 −0
Challenges Write a Deadfish Interpreter

Vyxal D, 26 bytes 0Ȯ(n«ƛ√J«`›‹²…`ĿĖD₈=$0<∨[0 Try it Online! 0 # Push 0 Ȯ(n # Iterating over the input «ƛ√J«`›‹²…`Ŀ # Translit...

posted 3y ago by A username‭  ·  edited 3y ago by A username‭

Answer
66%
+2 −0
Challenges Tile pyramids on top of each other!

Vyxal C, 6 bytes ƛ\/*øṀ Try it Online! ƛ # 1...n map \/* # That many / øṀ # Ascii art mirror # (C flag) Join by newlines and center

posted 3y ago by A username‭

Answer
66%
+2 −0
Challenges My house is destroyed! Can you make me one?

Canvas, 9 7 bytes #*⌐⤢n↔n -2 bytes thanks to @Razetime Uh I don't really know how to use Canvas - what I think this does is create the vertical wall, then half the horizontal one, then concatn...

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

Answer
66%
+2 −0
Q&A Tips for golfing in Ruby

If you have any tips for golfing in Ruby, share them as answers to this post.

1 answer  ·  posted 3y ago by snail_‭  ·  last activity 3y ago by snail_‭

Question code-golf tips
66%
+2 −0
Challenges Compute the determinant

Scala, 130 125 bytes Saved 5 bytes by returning 1 like Hakerh400's great answer def f(m:Seq[Seq[Double]]):Double=if(m.size<1)1 else(m.indices:\.0){(i,a)=>m(0)(i)*f(m.tail.map(r=>r.take(i...

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

Answer
66%
+2 −0
Challenges Compute the determinant

C, 147 bytes float d(float**m,int r){if(r<2)return**m;int i=r,j;float s=0,*n[--r];for(;i--;s+=(i%2?-1:1)**m[i]*d(n,r))for(j=r;j--;)n[j]=m[j+(j>=i)]+1;return s;} Try it online! Basically ...

posted 3y ago by Moshi‭

Answer
66%
+2 −0
Challenges Output 256 in many different ways

Unlambda, 1 solution Since Unlambda code that does something always contains the backtick character, there cannot be more than one solution. ```.2.5.6i

posted 3y ago by celtschk‭

Answer
66%
+2 −0
Challenges Output 256 in many different ways

Ruby, 7 solutions 256 4**4 -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-...

posted 3y ago by snail_‭

Answer
66%
+2 −0
Challenges Compute the determinant

Haskell, 75 73 bytes -2 bytes thanks to @user f[]=1 f(x:y)=foldr(-)0$zipWith(\i->(*f[take i r++drop(i+1)r|r<-y]))[0..]x Try it online!

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

Answer
66%
+2 −0
Challenges Make my value binary

Challenge What do computers understand? That's right, binary. All files are turned into binary digits when you run them, but what if I suggest giving you an int then turn it into it's binary value...

14 answers  ·  posted 3y ago by General Sebast1an‭  ·  last activity 3y ago by Olin Lathrop‭

Question code-golf number
66%
+2 −0
Challenges Make my value binary

Vyxal, 1 byte b Try it Online! b is for binary...

posted 3y ago by A username‭

Answer