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 Sort letters by height

Ruby, 53 51 bytes ->i{i.chars.sort_by{"tibdfghklpqyj".index(_1)||-1}} Try it online! Works in Ruby 2.7 and Ruby 3. Explanation ->i{...} is a short way to define a 1-argument lambda...

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

Answer
66%
+2 −0
Challenges Reverse the bits in a Byte

ARM Thumb machine code, 6 bytes 0: fa90 f0a0 rbit r0, r0 // reverse bits in 32-bit register 0 4: 4770 bx lr // return if bytes have to be octets (8-bit): ARM Thumb machine code...

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

Answer
66%
+2 −0
Challenges Is it part of the mandelbrot set?

Input is a number, you have to decide if it is part of the mandelbrot set or not, after at least 16 iterations. This is done by applying this formula: $z_n = z_{n-1}^2 + c$ repeatedly. $c$ is the ...

2 answers  ·  posted 2y ago by H_H‭  ·  last activity 3mo ago by CrSb0001‭

Question code-golf
66%
+2 −0
Challenges Digit Sum Integer Sequence (working title)

Python 3, 68 bytes def g(n): while True:print(n);d=[*map(int,str(n))];n+=min(d)+max(d) Outputs the n-based sequence indefinitely, starting with n.

posted 1y ago by msb‭

Answer
66%
+2 −0
Challenges Expected value of highest dice rolled

Dyalog APL, 14 bytes {6-+/⍵*⍨6÷⍨⍳5} Not bruteforce! An exact implementation of the formula \[ E_n = 6 - \sum_{i=1}^5 \left(\frac i 6\right)^n \] 6- 6 minus +/ the sum of 6÷⍨⍳5 the list 1/...

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

Answer
66%
+2 −0
Challenges Make $2 + 2 = 5$

Dyalog APL, 9 bytes +/⊢,2 2≡⊢ Takes the input as a pair +/ sum reduce ⊢ the input , concatenated with 2 2≡⊢ whether the input is equal to the list 2 2 (1 if true, 0 if false)

posted 2y ago by RubenVerg‭

Answer
66%
+2 −0
Challenges Borromean coprimes

SageMath, 68 66 64 Byte. 62 if you don't count the m= g=gcd;m=lambda a,b,c:min(g(a,b),g(a,c),g(b,c))<2or g(g(b,c),a)>1 Returns False for borromean coprimes and True for all other natural ...

posted 1y ago by H_H‭  ·  edited 1y ago by H_H‭

Answer
66%
+2 −0
Challenges Expected value of highest dice rolled

You roll $N$ six-sided dice simultaneously. Your score is the highest number rolled. If you play this game many times, what is the expected value (mean) of your score? Input A positive integer ...

2 answers  ·  posted 2y ago by trichoplax‭  ·  last activity 2y ago by RubenVerg‭

Question code-golf math dice
66%
+2 −0
66%
+2 −0
Challenges Digit Sum Integer Sequence (working title)

jq, 38 bytes while(1;.+("\(.)"|explode|max+min-96)) Try it online! prints the infinite sequence starting with $n$.

posted 4y ago by Razetime‭

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

Sclipting, (UTF-16) 2 bytes 反 Yay for builtins~

posted 4y ago by Moshi‭

Answer
66%
+2 −0
Challenges Define a mathematical expression in English

Background Inspired by this challenge that is also a mathematical English translator. Challenge Write a program that translates a mathematical expression using English with the following specifi...

1 answer  ·  posted 4y ago by General Sebast1an‭  ·  edited 3y ago by General Sebast1an‭

Question code-golf math string
66%
+2 −0
Challenges Repeat the characters

APL (Dyalog Unicode), 1 byte / Try it online! / is called Replicate.

posted 4y ago by Adám‭

Answer
66%
+2 −0
Challenges Repeat the characters

Jelly, 1 byte x Try It Online! x is Jelly's replicate atom. Since Jelly is inspired by languages like J, APL, etc, it is no surprise that is has an atom for a fairly important function.

posted 4y ago by hyper-neutrino‭

Answer
66%
+2 −0
Challenges Repeat the characters

jq, 32 27 bytes -5 bytes (thank you Razetime) .n as$n|.s/""|map(.*$n)|add Try it online!

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

Answer
66%
+2 −0
Challenges Repeat the characters

C (gcc), 56 bytes i;f(s,n)char*s,n;{for(;*s;s++)for(i=n;i--;putchar(*s));} Try it online! My attempt at recursion ended up at 61 bytes: o;f(s,n)char*s,n;{for(o=n;*s&&n--;putchar(*...

posted 4y ago by Lundin‭

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

Replace range() if $n < 4$ If you're using a for loop, you're probably using range() for the list count. You can actually replace it if the number inside range() is less than 4. Why? Examine th...

posted 4y ago by General Sebast1an‭

Answer
66%
+2 −0
Challenges Repeat the characters

Japt -m, 2 bytes pV Try it pV :Implicit map of first input string p :Repeat V :Second input times

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

Answer
66%
+2 −0
Challenges Repeat the characters

JavaScript, 36 bytes s=>n=>s.replace(/./g,`$&`.repeat(n)) Try it online!

posted 4y ago by Shaggy‭

Answer
66%
+2 −0
Challenges Repeat the characters

Rockstar, 90 bytes listen to S split S listen to N O's"" while S roll S into C let C be*N-0 let O be+C say O Try it here - code will need to be pasted in; s goes on the first line of ...

posted 4y ago by Shaggy‭

Answer
66%
+2 −0
Challenges Expand a polynomial

Vyxal, 2 bytes ∆ṙ Try it Online! That cheap builtin.

posted 4y ago by emanresu A‭

Answer
66%
+2 −0
Challenges Expand a polynomial

Japt -Q, 15 12 bytes à üÊËx_×*JpE -3 bytes thanks to @Shaggy Uses Vieta's. Try it

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

Answer
66%
+2 −0
Challenges Abbreviate everything

JavaScript (Node.js), 91 68 65 bytes s=>s.toUpperCase().match(/(?<=^| )[A-Z]|:|;|(?<=[.?!]) /g).join`` Assumes that the original text is properly formatted (has a space after punctuati...

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

Answer
66%
+2 −0
Challenges Create an Alphabet Diamond

Python 3, 99 bytes r=[*range(26)] a="ABCDEFGHIJKLMNOPQRSTUVWXYZ" for i in r+r[-2::-1]:print(" "*(26-i)+a[:i]+a[i::-1]) Try it online!

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

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

Python 3, 46 bytes Saved 8 bytes thanks to Shaggy! lambda n:[n-i*i or exit(1)for i in range(1+n)] Try it online! Python 3.8 (pre-release), 50 54 52 bytes Fixed a silly mistake thanks to Sh...

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

Answer