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 Can you give me half?

J, 4 unique, 4 char -:=_ How it works: -: results in half of what's on the right = results in signum of what's on the right _ is infinity

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

Answer
66%
+2 −0
Challenges Keyword golfing

Ruby 3.1.0, 274 259 249 bytes -10 bytes thanks to Paradox in the Ruby discord BEGIN{END{alias module class begin rescue retry ensure end if self elsif defined? for$.in true do super while f...

posted 3y ago by south‭  ·  edited 2y ago by south‭

Answer
66%
+2 −0
Challenges Looping counter

brainfuck, 31 bytes ++++++++++[[>]>-[<+>---]<[.<]>] Try it online!

posted 3y ago by orthoplex‭

Answer
66%
+2 −0
Challenges Looping counter

Haskell, 35 bytes main=mapM putStrLn$iterate('*':)"*" Attempt This Online! 55 -> 39, with orthoplex's idea. 39 -> 35 from orthoplex.

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

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

Lua 5.4.4, 99 bytes _=0s:gsub('.',function(c)_=({d=_-1,i=_+1;s=_*_})[c]or print(_)or _ _=({[256]=0,[-1]=0})[_]or _ end) Try it online! Thanks to @orthoplex for more shortening.

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

Answer
66%
+2 −0
Challenges Looping counter

MATL, 16 bytes 1`1yh1lZctDwQt]Tryitonline!TheTIOoutputfetchwilllikelyfail,somakesuretoclicktherunbuttontostoptheexecution.11yh1lZctDwQt] 1` ] - Push 1 o...

posted 3y ago by south‭

Answer
66%
+2 −0
Challenges Find near miss prime multiples.

Given a number n3 as input output the smallest number k such that the modular residues of k by the first n primes is exactly {1,0,1}. That is there is a prime in the first n p...

0 answers  ·  posted 2y ago by WheatWizard‭  ·  edited 2y ago by WheatWizard‭

Question code-golf number-theory
66%
+2 −0
Challenges Reverse the bits in a Byte

Simple challenge: Read a byte, swap bit 7 with 0, 6 with 1, 5 with 2 and 4 with 3 and then output the byte. For example the byte 0b1001'1100 would turn into 0b0011'1001. Rules: Shortest code wi...

6 answers  ·  posted 1y ago by H_H‭  ·  last activity 1y ago by lovebuny‭

Question code-golf
66%
+2 −0
Challenges Reverse the bits in a Byte

Sclipting, (UTF-16) 26 bytes 갠긂갠밂乘감뒄뀢감雙갿및剩 Uses a formula I found here unsigned char b; // reverse this (8-bit) byte b = (b * 0x0202020202ULL & 0x010884422010ULL) % 1023;

posted 1y ago by Moshi‭

Answer
66%
+2 −0
Meta A random button for ordering Code Golf post lists

I was surprised by your post, as I don't recall any discussions about changing that, and then I wondered how to change that. I looked around in the site-level and category-level settings both here...

posted 2y ago by Monica Cellio‭  ·  edited 2y ago by Monica Cellio‭

Answer
66%
+2 −0
Meta A random button for ordering Code Golf post lists

On most Codidact communities the posts list has a "Random" button among the sorting buttons: The only exceptions are the Codidact Proposals community, and Code Golf: This suggests that it is ...

1 answer  ·  posted 2y ago by trichoplax‭  ·  edited 2y ago by Monica Cellio‭

Question discussion status-completed
66%
+2 −0
Challenges Reverse the bits in a Byte

Python (3.6 and up), 32 bytes (unsigned integer I/O) lambda x:int(f'{x:08b}'[::-1],2) Input and output are int objects. This also reverses the bits in integers larger than 255, implicitly infer...

posted 1y ago by Karl Knechtel‭

Answer
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 1y ago by lovebuny‭  ·  edited 1y 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: zn=zn12+c repeatedly. c is the ...

2 answers  ·  posted 1y ago by H_H‭  ·  last activity 1mo 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 En=6i=15(i6)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 3y ago by Razetime‭

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

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

posted 3y 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 3y 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 3y ago by Adám‭

Answer