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 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 emanresu A‭  ·  edited 3y ago by emanresu A‭

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 emanresu A‭

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 emanresu A‭

Answer
66%
+2 −0
Challenges Word Set Square

Vyxal J, 12 bytes ḣmėƛ÷꘍ṘǏ;⁋?m Try it Online! ḣ # Head extract (x[0], x[1:] ) m # Mirror the ToS (x[1:]) ė # Zip with 0...length ƛ ; # Map... ...

posted 3y ago by emanresu A‭

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

Vyxal R, 1 byte R Try it Online! Function must be inserted in the header. The R flag casts integers to ranges when an integer can't be used. R is the builtin for 'Reduce list by function', an...

posted 3y ago by emanresu A‭

Answer
66%
+2 −0
66%
+2 −0
Sandbox Convert integer to English [FINALIZED]

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

66%
+2 −0
Challenges Generalized Sort

Scala, 64 bytes c=>_.sortBy(x=>c.map(_(x)))(math.Ordering.Implicits.seqOrdering) Try it in Scastie! A rather crude answer, but I'll come back later to golf it. It's rather simple, though...

posted 3y ago by user‭

Answer
66%
+2 −0
Challenges Word Set Square

JavaScript, 76 bytes Outputs an array of lines. s=>[...s+=[...s].reverse().join``].map((c,x)=>s[-~x]?c.padEnd(x)+(x?c:``):s) Try it online!

posted 3y ago by Shaggy‭

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

jq, 48 bytes [while(.>0;./2|floor)]|map(.%2)|reverse|join("") Try it online! jq is the Language of the month for September! if the output is not required as per the question, join can be o...

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

Answer