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

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

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

posted 3y ago by celtschk‭  ·  edited 1y 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
66%
+2 −0
Q&A Tips for golfing in Python

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

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

Question code-golf tips
66%
+2 −0
Challenges My house is destroyed! Can you make me one?

jq --raw-output, 32 bytes jq is the language of the month, apparently. Here it is! Not sure if the --raw-output flag really matters, someone let me know. "#"*.+(" #"+" "*(.-2)+"#")*(.-1) Try ...

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

Answer
66%
+2 −0
Challenges When The Ternary Is Balance

Python 3, 78 bytes def t(n,*l):d="0+-"[n%3];return d*(not l or n*n) if n*n<2 else t((n+1)//3,1)+d Try it online!

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

Answer
66%
+2 −0
Challenges Stairs? Stairs! Stairs.

Haskell, 78 bytes (!)0.(*2) i!n|i<n=(drop 3$(n-i)#' '++"_/"++i#'#'):(i+2)!n|0<1=[] (#)=replicate Try it online!

posted 3y ago by Hakerh400‭

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

Combine conditionals Python has its fair share of comparison operators and can actually be used in a single conditional. For example: x == 2 and y == 2 can be: x==y==2 Used on Make $2 + 2 ...

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

Answer
66%
+2 −0
Challenges "Hello, {name}!"

Japt, 10 bytes `HÁM, {U}! Try it The backtick decompresses a compressed string, the {} is Japt's string interpolation and U is the first input variable.

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

Answer
66%
+2 −0
Challenges "Hello, {name}!"

Haskell, 43 35 bytes main=interact$("Hello, "++).(++"!") Try it online!

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

Answer
66%
+2 −0
Challenges "Hello, {name}!"

C (gcc), 43 bytes a[99];main(){printf("Hello, %s!",gets(a));} Try it online!

posted 3y ago by Lundin‭

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

Ruby, 15 bytes ->a{a.all?a[0]} ->a{ } # lambda taking array `a` a.all? # do all items in the array match... a[0] # ...the first? Try it online!

posted 3y ago by snail_‭

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

C (gcc), 46 bytes f(int*a){return *a<0|a[1]<0||*a==a[1]&f(a+1);} This takes an array that is terminated by a negative number (which is not part of the list content, just like the te...

posted 3y ago by celtschk‭

Answer
66%
+2 −0
Challenges Reverse an ASCII string

Lua, 32 bytes print(string.reverse(io.read())) Try it online! Noice built-in.

posted 3y ago by General Sebast1an‭

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

Ruby, 43 bytes ->n{(1..n).map{|i|" "*(n-i)+?/*i+?\\*i}*$/} ->n{ } # lambda (1..n).map{|i| } # map over 1 to n ...

posted 4y ago by snail_‭

Answer
66%
+2 −0
Challenges Towering Cistercian Representation

JavaScript (Node.js), 606 bytes for(_="=>\\\\ =j(...(a:').join`\\n`[q](/aa),/ / / d[c[___) .match(/.{.||]/g,=='.mapf=(n,m=([a,b]a?m(b)+a',l=10000n,j=, b,c=0a-c?[b(cj,b,c+1)]:[],b=[q='rep...

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

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

APL (Dyalog Classic), 47 bytes i←+∘1⋄d←-∘1⋄s←×⍨⋄o←⎕∘←⋄{}{0⌈a×256≠a←⍎⍕⍺,⍵}/⌽0,⍞ Try it online!

posted 4y ago by rak1507‭

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

JavaScript (Node.js), 80 bytes f=a=>a.map(a=>(a&=6,a-2?a-6?c+=1-a/2:d+=c+' ':c*=c,c*=c!=-1&c!=256),c=0,d='')&&d Try it online!

posted 4y ago by Hakerh400‭

Answer
66%
+2 −0
Challenges Length of a Sumac Sequence

Jelly, 9 bytes Rȧ_@Rп@L Try it online! Takes $t_1$ on the left and $t_2$ on the right. R}ȧ_@RпL works given the arguments in the opposite order. R Ascending range from 1 to t_1 (...

posted 4y ago by Unrelated String‭  ·  edited 4y ago by Unrelated String‭

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

Pyth, 10 bytes s*R^H~hZhA Try it online! Alternate 10 byte solution: s.e*b^eQkh Try it online!

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

Answer