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.6k posts
 
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 1y ago by TheCodidacter, or rather ACodidacter‭  ·  edited 1y 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 2y 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 2y 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 2y ago by Zakk‭  ·  edited 2y 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 2y ago by Zakk‭  ·  edited 2y 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 2y ago by south‭  ·  edited 2y 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 2y ago by Zakk‭  ·  edited 2y 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 2y 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 2y ago by romanp‭

Answer
50%
+0 −0
Challenges Word Count Tool

Python 3.8, 73 bytes lambda x:[len(x.split()),len(x.replace('\n','')),len(''.join(x.split()))] Try it online!

posted 2y ago by dino‭

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

J, 17 char +/`5:@.(2*./@:=]) How it works: What's within parentheses tests if both numbers on the right are 2. If so, the verb agenda @. selects the verb 5: which is always 5. If not, the ve...

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

Answer
50%
+0 −0
Challenges The Pell Numbers

J, 30 char ((2*%:2)%~(1+%:2)&^-(1-%:2)&^) ((2*%:2)%~(1+%:2)&^-(1-%:2)&^) 0 0 ((2*%:2)%~(1+%:2)&^-(1-%:2)&^) 1 1 ((2*%:2)%~(1+%:2)&^-(1-%:2)&^) 2 2 ...

posted 2y ago by torres‭

Answer
50%
+0 −0
Challenges Solve Goldbach's Conjecture

J, 46 char ({.(+/m)#a),{:(+/"1 m=:x=+/~a)#a=:p:i._1 p:x=: Sample runs ({.(+/m)#a),{:(+/"1 m=:x=+/~a)#a=:p:i._1 p:x=:4 2 2 ({.(+/m)#a),{:(+/"1 m=:x=+/~a)#a=:p:i._1 p:x=:6 3 3 ({.(+/m)#a),{:...

posted 2y ago by torres‭

Answer
50%
+0 −0
Challenges Are All Elements Equal?

J, 5 char 2>#~. How it works: '~.' produces list of unique elements of list on its right '#' counts how many elements in the list on its right '2>' tests if number on its right only ha...

posted 2y ago by torres‭

Answer
50%
+0 −0
Challenges A number adder, not a death adder

J, 7 char '+/',": Sample runs: '+/',": 6 +/6 +/6 5 11 '+/',": 55 +/55 +/55 45 100

posted 2y ago by torres‭

Answer
50%
+0 −0
Challenges Golf a FRACTRAN interpreter

J, 36 char {._2{(}.,~(=<.)@v{.@#v=.}.*{.)^:(<_) Sample runs: {._2{(}.,~(=<.)@v{.@#v=.}.*{.)^:(<_) 1096135733 78r55 5r3 1r5 11r2 5r7 328842888196762472689573703 {._2{(}.,~(=...

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

Answer
50%
+0 −0
Challenges "Hello, {name}!"

J, 29 char ('!',~'Hello, ',1!:1<1)1!:2<4 Sample run ('!',~'Hello, ',1!:1<1)1!:2<4 torres Hello, torres!

posted 2y ago by torres‭

Answer
50%
+0 −0
Challenges Find the IP address class

J, 46 char 'ABCDE'{~<:0 128 192 224 240 I.>:".{.}.;.1'.', Sample runs 'ABCDE'{~<:0 128 192 224 240 I.>:".{.}.;.1'.', '127.255.255.255' A 'ABCDE'{~<:0 128 192 224 240 I...

posted 2y ago by torres‭

Answer
50%
+0 −0
Challenges Keyword golfing

C (gcc), 358 bytes static inline _Noreturn float f(union u);extern _Thread_local _Complex long double*restrict B;main(void){_Atomic register enum {A};typedef _Alignas(unsigned char)struct S;_Sta...

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

Answer
50%
+0 −0
Challenges "Hello, World!"

JavaScript V8, 26 bytes console.log`Hello, World!`

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

Answer