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 Mediocre pop count

APL (Dyalog APL), 61 bytes {⍵/⍨~(⊢∊⌊/,⌈/)+⌿0 1↓2⊥⍣¯1⊢0,⎕UCS⍵} Attempt This Online! APL's style of filter works very well here, since we can check for the max and min elements here: (⊢∊⌊/,⌈/) ...

posted 1y ago by Razetime‭

Answer
60%
+1 −0
Challenges Just the vowels please

JavaScript, 27 24 bytes Input as a string, output as a character array or empty array. s=>s.split(/[^aeiou]*/i) Try it online! Thanks to Moshi for pointing out the * I was missing that w...

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

Answer
60%
+1 −0
Challenges Just the vowels please

Japt v2.0a0, 3 bytes o\v Try it o\v :Implicit input of string o :Keep only \v :RegEx /[aeiou]/gi

posted 1y ago by Shaggy‭

Answer
60%
+1 −0
Challenges Just the vowels please

Sclipting, (UTF-16) 22 bytes 놵멡뉖땯더굅낔뭕뇐虛移 Nothing complicated, just replaces the regex [^aeiouAEIOU] with the empty string.

posted 1y ago by Moshi‭

Answer
60%
+1 −0
Challenges Balanced quinary quasiquine

Given an integer $N$ in balanced quinary, output the first $N$ characters of your source code if $N$ is positive, or the last $-N$ characters of your source code if $N$ is negative. Terminology ...

1 answer  ·  posted 1y ago by trichoplax‭  ·  edited 1y ago by trichoplax‭

Question code-golf quine base
60%
+1 −0
Challenges 55 fruit salad: choose your own Kolmogorov complexity

Japt, 233 bytes `ÜÊ Ò˜ Í a×G ¯¯o ÖÚb ¯ØÚ ×– »Ûá ÝÁ„ Á²g fig ¤¶n ÓI„ lªo §Ö‡ ÚAo Ú-n Û u Ûo nÂ) šem ÇÓy pe‡ pi¦ Îñˆ ΰn Ѧk Ѧl sŽb Ɏ ȃp Èîp ÈlŸ ‘y °ÛG Ù i abiu alڈ app¤ ‡aza bael b„„a ¼ÚAe ÞÃ...

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

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

Vyxal, 1 byte . Try it Online! Very simple 1 byter

posted 1y ago by lyxal‭

Answer
60%
+1 −0
Challenges Knight safe squares

Rust, 236 184 166 142 bytes |i:u64|{let s=0x101010101010101;let(a,b,c,d)=(i&252*s,i&254*s,i&127*s,i&63*s);(i|a<<6|b<<15|c<<17|d<<10|d>>6|c>>15|b...

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

Answer
60%
+1 −0
Challenges Sort letters by height

C (gcc), 152 bytes r;e(c){r=c=='j'?5:strchr("bdfghklpqy",c)?4:c=='i'?3:c=='t'?2:1;}c;s;f(char*i,char*o){s?(e(*i),c=r,e(*o)):(qsort(i,strlen(i),s=1,f),puts(i));return r-c;} Try it online! Out...

posted 1y ago by Lundin‭  ·  edited 1y ago by trichoplax‭

Answer
60%
+1 −0
Sandbox The Pell Numbers[FINALIZED]

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

60%
+1 −0
Meta Microcontroller-involving challenges and the rules.

For this to work, I think we need to rule out all start-up code (the C runtime) but also the register maps. So I think answers should be a void main (void){ ... } (or equivalent) function solution ...

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

Answer
60%
+1 −0
Challenges The Pell Numbers

Haskell, 21 bytes f=0:scanl((+).(*2))1f Try it online!

posted 3y ago by Hakerh400‭

Answer
60%
+1 −0
Challenges Ratio limits of fibonacci-like series

Stax, 5 bytes òP^↓Φ Run and debug it Same idea as Quintec's answer. Input as a floating point number. Explanation 1gpun+ 1 start with 1 gp apply the following till a fixpoint...

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

Answer
60%
+1 −0
Q&A Tips for golfing in Scala

What general tips do you have for golfing in Scala? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to Scala (e.g. "remove comments" i...

1 answer  ·  posted 3y ago by user‭  ·  edited 3y ago by user‭

Question code-golf tips
60%
+1 −0
Q&A Tips for golfing in Scala

Making a function with val can be shorter than with a def If you're pattern matching, you can use Scala's special syntax and omit match when assigning an anonymous function to a val. As you can se...

posted 3y ago by user‭

Answer
60%
+1 −0
Challenges Solve Goldbach's Conjecture

APL (Dyalog Unicode), 32 bytes (SBCS) {⊃(⊢(/⍨)⍵=+/¨),∘.,⍨(⊢~∘.×)⍨1↓⍳⍵} Try it online! {⊃(⊢(/⍨)⍵=+/¨),∘.,⍨(⊢~∘.×)⍨1↓⍳⍵} ⍳⍵ ⍝ Range from 1 to n ...

posted 3y ago by user‭

Answer
60%
+1 −0
Challenges Cumulative Counts

Jelly, 7 bytes =þ`ÄŒDḢ Try it online!

posted 3y ago by hyper-neutrino‭

Answer
60%
+1 −0
Challenges Cumulative Counts

Scala 3, 50 44 bytes ? => ?.indices zip?map(?take _+1 count _.==) Try it in Scastie! This is an annoying, stupid approach. The more elegant one using inits was much longer (x=>x.inits.to...

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

Answer
60%
+1 −0
Challenges Cumulative Counts

Husk, 4 bytes Sz#ḣ Try it online! Explanation Sz#ḣ Sz zip the input ḣ with its prefixes # using the count function

posted 3y ago by Razetime‭

Answer
60%
+1 −0
Challenges Beaver Code Decryption

Husk, 8 bytes ΣTm?I₀ε½ Try it online! It's jelly but reversed. 1 byte lesser due to a single byte halve.

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

Answer
60%
+1 −0
Challenges Beaver Code Decryption

APL(Dyalog Extended), 32 bytes SBCS {1=≢⍵:⍵⋄0~⍨,⍉↑∇¨↓2 ¯1⍴⍵,0/⍨2|≢⍵} Try it on APLgolf! A dfn submission which takes a string as input. I thought this would be much shorter, but it's only a s...

posted 3y ago by Razetime‭

Answer
60%
+1 −0
Challenges Really Cool Numbers

APL (Dyalog Unicode), 30 29 bytes Saved 1 byte thanks to Razetime (could've saved 1 more with a tradfn, but I didn't feel like it) {∧/(0=1|+/÷≢)¨1↓¨g¨(g←∪⊢∨⍳)⍵} Try it online! This answer w...

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

Answer
60%
+1 −0
Challenges Really Cool Numbers

Husk, 9 bytes ΛöS=⌊AhḊḊ Try it online! or Verify all testcases returns number of divisors + 1 for true and 0 for false.

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

Answer
60%
+1 −0
Challenges Print the Great Numeric Pyramid

BQN, 33 bytesSBCS >(⌽(⊑¨55↑+˜⊸+⊔'0'+⌽⊸⌊⊸⌊)¨˜1↓↑)↕28 Run online! Minimum of barycentric coordinates placed according to a skew transformation on two of them. So, the min(i,j,27-i-j) thing pr...

posted 3y ago by Marshall Lochbaum‭

Answer
60%
+1 −0
Challenges Backspace an array

Python 3.8 (pre-release), 62 bytes f=lambda x,a=[]:f(x[1:],a+[x[0]]if x[0]else a[:-1])if x else a Try it online! -11 bytes thanks to user

posted 3y ago by hyper-neutrino‭  ·  edited 3y ago by hyper-neutrino‭

Answer