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
 
50%
+0 −0
Challenges Evaluation order of an APL n-train

Husk, 8 bytes ηÖ↔mo⌈½ŀ Try it online! Same idea as xash's answer from CGCC.

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

Answer
50%
+0 −0
Challenges Backspace an array

Japt, 9 bytes ô rÈÔÅÔcY Try it or run all test cases ô rÈÔÅÔcY :Implicit input of array ô :Split on falsey elements (i.e., 0) r :Reduce by È :Passing...

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

Answer
50%
+0 −0
Challenges Prime Difference

Japt, 15 14 bytes @§XnÈj}aX+j}a2 Try it or run all test cases @§XnÈj}aX+j}a2 :Implicit input of integer U @ :Function taking an integer X as argument § ...

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

Answer
50%
+0 −0
Sandbox Recreate modulo [cancelled]

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

Article code-golf math
50%
+0 −0
Challenges Create a Sudoku

Japt, 10 bytes Outputs a 2D-array. 9õ ñu3 £éX Try it 9õ ñu3\n£éX 9õ :Range [1,9] ñ :Sort by u3 : Mod 3 of each \n :Assign to variabl...

posted 4y ago by Shaggy‭

Answer
50%
+0 −0
Challenges Evens or Odds - you know this one

Python 3, 51 25 bytes n=int(input());print(n%2) Try it online! Golfed 26 bytes using the technique from my PHP answer.

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

Answer
50%
+1 −1
Meta Is my extension-like library allowed to be used in answers?

If you actually use the library, sure, I guess. How you are going to get it running on online compilers, I have no idea. It's very uninteresting for others to view some code using a custom library ...

posted 4y ago by Lundin‭  ·  edited 11mo ago by Timwi‭

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

Standard ML, 23 bytes implode o rev o explode

posted 1y ago by qwr‭

Answer
50%
+0 −0
Challenges Digit Sum Integer Sequence (working title)

Dyalog APL, 23 bytes {⍵+(⌈/+⌊/)10⊥⍣¯1⊢⍵}⍣⎕⊢1­⁡​‎‎⁡⁠⁢⁢⁢‏⁠‎⁡⁠⁢⁢⁣‏‏​⁡⁠⁡‌⁢​‎⁠⁠‎⁡⁠⁢⁡⁤‏⁠‎⁡⁠⁢⁢⁡‏‏​⁡⁠⁡‌⁣​‎‎⁡⁠⁢‏⁠‎⁡⁠⁣‏‏​⁡⁠⁡‌⁤​‎⁠‎⁡⁠⁤‏⁠‎⁡⁠⁢⁡‏⁠‎⁡⁠⁢⁢‏⁠‎⁡⁠⁢⁣‏⁠‎⁡...

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

Answer
50%
+0 −0
Sandbox Single character Roman numeral [FINALIZED]

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

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

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

50%
+0 −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 2y ago by TheCodidacter, or rather ACodidacter‭  ·  edited 2y ago by TheCodidacter, or rather ACodidacter‭

Answer
50%
+0 −0
Meta Default Rules: Code Golf I/O

A program may use IOs for input and output. A input can be read via IO, which can be a port with (multiple) IOs each IO reads a symbol (a bit or more when you have a ADC). Or it can come from fram...

posted 1y ago by H_H‭

Answer
50%
+0 −0
Challenges Knight safe squares

Python, 143 bytes def r(i): y,z=65537,1+(1<<32);s=257*y*z;n=(i|(i&252*s)*y>>10|(i&254*s)*z>>17|(i&127*s)*z>>15|(i&63*s)*y>>6)&(1<<64)-1 ...

posted 1y ago by Karl Knechtel‭

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 1y ago by H_H‭  ·  edited 1y ago by H_H‭

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

R + magrittr, 31 bytes .%>%utf8ToInt%>%rev%>%intToUtf8

posted 1y ago by qwr‭

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

R, 32 bytes \(s)intToUtf8(rev(utf8ToInt(s))) Attempt This Online!

posted 1y ago by qwr‭

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

JavaScript (V8), 13 bytes x=>x**.5%1==0 Try it online!

posted 3y ago by Zakk‭

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

Lua 5.4, 9 bytes n^.5%1==0 Try it online! The entire compressed code is 33 bytes: function f(n)return n^.5%1==0 end Try it here. It's not clear whether the rules allow the first form (i...

posted 3y ago by Zakk‭

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

C (gcc), 37 bytes f(n,p){while(++p*p<n);return p*p==n;} Try it online! The solution is based on the simple fact that: $$\forall n \in \mathbb{N}, n \text{ is a perfect square} \Longleftrig...

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

Answer
50%
+0 −0
Challenges Create a range grid

Lua 5.4, 76 bytes function(m,n)for i=0,m*n-1 do _=(i%n==0)and print()or io.write(i,' ')end end Try it online!

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

Answer
50%
+0 −0
Challenges Create a range grid

MATL, 8 bytes tp:qwPe! Try it online! tp:qwPe! t : duplicate with implicit input (function args as array) p : product [2 3]p -> 6 : : range 1..n q : decremen...

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

Answer
50%
+0 −0
Challenges Word Count Tool

Lua 5.4, 62 bytes _,w=s:gsub('%w+',0)_,c=s:gsub('[^\n]',0)_,n=s:gsub('[%g\t]',0) Attempt This Online! Another version, 65 bytes: p={'%w+','[^\n]','[%g\t]'}for i=1,#p do _,r[i]=s:gsub(p[i],'...

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

Answer
50%
+0 −0
Challenges Word Count Tool

JavaScript (Node.js), 60 bytes s=>[/\w+/g,/./g,/[\S\t]/g].map(p=>(v=s.match(p))?v.length:0) Attempt This Online!

posted 3y ago by Zakk‭

Answer
50%
+0 −0
Challenges Word Count Tool

Wolfram Language (Mathematica), 70 bytes {Tr[1^StringSplit@#],StringLength@#,StringLength@StringDelete[#," "]}& Try it online! What made me decide to use Mathematica for string processing?...

posted 3y ago by romanp‭

Answer