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.5k posts
 
60%
+1 −0
Challenges Reverse an ASCII string

Python, 16 bytes lambda s:s[::-1] Attempt This Online!

posted 9mo ago by qwr‭

Answer
50%
+0 −0
Challenges Reverse an ASCII string

Brainfuck, 10 Bytes ,[>,]<[.<] Requires EOF to be 0. Try it online! ,[>,]<[.<] , # Read character [ ] # loop as long as current cell is not 0 (EOF) >, ...

posted 9mo ago by H_H‭  ·  edited 9mo ago by H_H‭

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 9mo ago by Monica Cellio‭  ·  edited 9mo 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 9mo ago by trichoplax‭  ·  edited 9mo ago by Monica Cellio‭

60%
+1 −0
Challenges Make $2 + 2 = 5$

x86-32 assembly, 14 bytes Straightforward solution with custom calling convention: inputs in eax and ebx, output in eax. cmp opcode could be smaller if limited to 8-bit integers? 00000000 <add...

posted 9mo ago by qwr‭

Answer
60%
+1 −0
Challenges Reverse engineer the colors for a layout.

At my job we have to sometimes lay out materials. Materials come in large long rolls and are cut into smaller pieces when being laid out. When we order the rolls we draw up a layout document which...

0 answers  ·  posted 9mo ago by WheatWizard‭

Question code-golf
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 10mo ago by Taeir‭  ·  edited 10mo ago by Taeir‭

Answer
60%
+1 −0
Challenges Label a hinged tetromino

Dyalog APL, 89 bytes {1∊∘∊¨⍷¨∘⍵¨⍬{0∊⍴⍵:⍺⋄(⍺,⊂A)∇⍵~A←(⌽¨,⊢)(⊖¨,⊢)(⍉¨,⊢)⊣/⍵}(e⍤⍉e←{⍵/⍨×+⌿⍵})¨4 4∘⍴¨,⌿2⊥⍣¯1⍳2*16} Requires IO to be zero. Thanks Adám for -8 bytes! Ungolfed version: { remove...

posted 10mo ago by RubenVerg‭  ·  edited 10mo ago by RubenVerg‭

Answer
60%
+1 −0
Challenges Probability of rolling all 6 dice faces

cQuents*, 10 bytes O920A$/6^$ That * there is because, while this should be a specification-correct program that does the correct computation, the only interpreter available does not implement ...

posted 10mo ago by RubenVerg‭

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

Given a number $n \geq 3$ 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 10mo ago by WheatWizard‭  ·  edited 10mo ago by WheatWizard‭

60%
+1 −0
Challenges Probability of rolling all 6 dice faces

Dyalog APL, 19 bytes (with index origin zero) {-/(!∘6×⍵*⍨6÷⍨⊢)⍳7} This isn't bruteforce! The number of cases where all six faces appear are the OEIS sequence A000920. \[ P_n = \frac{\mathsf{...

posted 10mo ago by RubenVerg‭  ·  edited 10mo ago by RubenVerg‭

Answer
60%
+1 −0
Challenges Probability of rolling all 6 dice faces

Thunno 2, 14 bytes 6RẉDæḳ6R⁼;,ḷẸ\ Attempt This Online! Note: brute-force, so times out for $n\ge5$ on ATO, but I have verified it with $n=6$ on my computer. Explanation 6RẉDæḳ6R⁼;,ḷẸ\ # Imp...

posted 10mo ago by Thonnu‭

Answer
60%
+1 −0
Challenges Probability of rolling all 6 dice faces

Dyalog APL, 21 bytes {≢⍸6=(≢∪)¨⍳⍵/6}÷(6∘*) Bruteforce solution :) ⍳⍵/6 n-dimensional array of all possibilities of rolling $n$ dice, each element is a vector of the dice values ≢ count the ...

posted 10mo ago by RubenVerg‭  ·  edited 10mo ago by RubenVerg‭

Answer
75%
+4 −0
Challenges Probability of rolling all 6 dice faces

The probability of rolling every number from 1 to 6 with $N$ six-sided dice. Input A positive integer $N$. Your code must work for inputs up to and including 10, but may crash, error, or give ...

4 answers  ·  posted 10mo ago by trichoplax‭  ·  last activity 10mo ago by RubenVerg‭

Question code-golf math dice
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 10mo ago by RubenVerg‭  ·  edited 10mo ago by RubenVerg‭

Answer
60%
+1 −0
Challenges Label a hinged tetromino

JavaScript (Node.js), 892 bytes (not fully working) I=>{N=a=>Math.min(...a);X=a=>Math.max(...a) C=[];s=[t=[],[]];S="splice";p="push" c=I[P="map"](a=>a[P](p=>p-N(a))) d=X(c[1])-X(...

posted 10mo ago by TheCodidacter, or rather ACodidacter‭  ·  edited 10mo ago by TheCodidacter, or rather ACodidacter‭

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 10mo ago by RubenVerg‭

Answer
60%
+1 −0
Challenges Roll n fair dice

Dyalog APL, 2 bytes ?⍴ Dyadic 2-train, takes $n$ as its left argument and $m$ as its right argument The Roll function ? expects an array of maximum bounds and replaces each item with a random ...

posted 10mo ago by RubenVerg‭

Answer
60%
+1 −0
Challenges Can you give me half?

[Extended] Dyalog APL, 4 bytes* *10 bytes, 4 unique '÷'÷⍥≢'÷÷' This computes the length of the string '÷' divided by the length of the string '÷÷' Alternate solution (extended only) (6 unique...

posted 10mo ago by RubenVerg‭  ·  edited 9mo ago by RubenVerg‭

Answer
60%
+1 −0
Challenges Expected value of highest dice rolled

Dyalog APL, 16 bytes {(+/÷≢)⌈/¨,⍳⍵/6} Explanation: ,⍳⍵/6 generate a list of all the possible sets of rolls ⌈/¨ find the maximum of each +/÷≢ find the average (sum up all values and divide ...

posted 10mo ago by RubenVerg‭  ·  edited 10mo ago by RubenVerg‭

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 10mo ago by trichoplax‭  ·  last activity 10mo ago by RubenVerg‭

Question code-golf math dice
60%
+1 −0
Sandbox Probability of rolling all 6 dice faces [FINALIZED]

posted 10mo ago by trichoplax‭  ·  edited 10mo ago by trichoplax‭

66%
+2 −0
Sandbox Expected value of highest dice rolled [FINALIZED]

posted 10mo ago by trichoplax‭  ·  edited 10mo ago by trichoplax‭

50%
+0 −0
Sandbox A word suggester [FINALIZED]

posted 10mo ago by trichoplax‭  ·  edited 8mo ago by trichoplax‭

66%
+2 −0
Meta Should posting on Meta affect reputation?

When we launched this community, we did not yet have the ability to set different reputation grants for different categories. We've had this for a while but we failed to follow up before now, sorr...

0 answers  ·  posted 10mo ago by Monica Cellio‭  ·  edited 10mo ago by Monica Cellio‭

Question discussion