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 »

Posts by Hakerh400‭

59 posts
71%
+3 −0
Challenges Golf me a polygonal loader

JavaScript (Browser), 670 bytes for(_="=1,w=):=0,w(=f(||(.join`w?q-w?q=-w(a,b=>A(L*5,a),g.innerText=N=L=D=T,I=,c,d)a-d?I,b(d,cd+1c,A=)I(a,(x,y)[...y,b(x)],[](U=_(Kf=({value:a})a==[a|]+[]&&a...

posted 3y ago by Hakerh400‭  ·  edited 3y ago by ArtOfCode‭

Answer
71%
+3 −0
Challenges Partial Sums of Harmonic Series

JavaScript (Node.js), 47 bytes f=(a,b=0,c=a=>a&&1/a+c(a-1))=>c(b)<a?f(a,b+1):b Try it online! For large numbers, a rounding error will occur and yield incorrect result. The ...

posted 3y ago by Hakerh400‭

Answer
71%
+3 −0
Challenges Word Set Square

Haskell, 110 bytes f a=s>>=(#)$a++reverse a c@(a:b)!f=f c:b!f _!_=[] f#n=n!((n!).f) s(p:q)(d:e)(b:c)|e==c||e==[]=b|q==c=d|0<1=' ' Try it online!

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

Answer
66%
+2 −0
Challenges Win a War (or at least a few battles)

JavaScript, 227 bytes (n,k,A,C=(a,b)=>a?[...C(--a,b),b(a)]:[],f=m=>m?C(n+1,i=>f(m-1).map(([p,s])=> [[...p,i],s+i])).flat():[[[],0]])=>f(k).map(([b,s])=>a=s-n?a:b.map((a,b)=&gt...

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

Answer
66%
+2 −0
Challenges Run-length encode a byte sequence

JavaScript (Node.js), 146 bytes f=(a,c=n=~(b=d=[],e=x=>x&&(c>191|d>2?b.push(d+192,c):b.push(...d+n?[c,c]:[c]),c=n,d=0)))=>(a.map(b=>c^n?c=(e(d>62|b-c),d++,b):(c=b,d=1))...

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

Answer
66%
+2 −0
Challenges Encode and decode floating point integers

Haskell, 219 194 bytes h!n=x n?(a?c$d>n&&(even a?f(<)$f(==)))$h where(a,b)=e!!(c-1);(c,d)=dropWhile((<n).snd)e!!0;f g=g(n*2)$b+d x n=m?(2^(e-1)*(m+32))$e<1where(e,m)=divMod ...

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

Answer
66%
+2 −0
Challenges Decode periodic decimal fractions

Haskell, 352 bytes f a=let{(d,e)=y$filter(>'-')a;f=drop 1e;g=0!h;h=fst n;i=scanr(:)[]h;(j,k)=elem '.'f%(1!head(filter(\a->a>[]&&elem(a++a)i)i++[[last$'0':h]]));(l,m)=(read('0':d...

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

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

Haskell, 43 35 bytes main=interact$("Hello, "++).(++"!") Try it online!

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

Answer
66%
+2 −0
Challenges Stairs? Stairs! Stairs.

Haskell, 78 bytes (!)0.(*2) i!n|i<n=(drop 3$(n-i)#' '++"_/"++i#'#'):(i+2)!n|0<1=[] (#)=replicate Try it online!

posted 2y ago by Hakerh400‭

Answer
66%
+2 −0
Challenges Compute the determinant

Haskell, 75 73 bytes -2 bytes thanks to @user f[]=1 f(x:y)=foldr(-)0$zipWith(\i->(*f[take i r++drop(i+1)r|r<-y]))[0..]x Try it online!

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

Answer
66%
+2 −0
Challenges Are All Elements Equal?

brainfuck, 40 bytes Outputs ÿ if all elements are equal, and \x00 byte otherwise. ->,>,[[-<->>+<]<[-<[-]>]>>[-<<+>>]<,]<<. Try it online! ...

posted 3y ago by Hakerh400‭

Answer
66%
+2 −0
Challenges 99 Shortened Bottles of Beer

Haskell, 221 215 bytes f=a 99 (#)=(++) a n=d n#", "#c".\n"n#b(n-1) b 0="Go to the store and buy some more, "#d 99#"." b n="Take one down and pass it around, "#d n#".\n\n"#a n c m n=show n#"...

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

Answer
66%
+2 −0
Challenges Gamer Meme Creator

Haskell, 116 bytes a#b=a!b:a++[a!"BOTTOM TEXT"] a!b=replicate(div(m a-k b)2)' '++b m=foldr1 max.map k k=length.dropWhile(==' ').reverse Try it online!

posted 3y ago by Hakerh400‭

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

Haskell, 64 bytes main=do a<-getLine;putStr$"main=getLine>>=print.("++a++"+).read" Try it online! Run both programs

posted 3y ago by Hakerh400‭

Answer
66%
+2 −0
Challenges Solve Goldbach's Conjecture

JavaScript (Node.js), 87 bytes f=(a,b=2,c=a-b,d=(a,b=2)=>b<a?a%b&&d(a,b+1):1,e=a=>d(++a)?a:e(a))=>d(c)?[b,c]:f(a,e(b)) Try it online!

posted 3y ago by Hakerh400‭

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

JavaScript (Node.js), 80 bytes f=a=>a.map(a=>(a&=6,a-2?a-6?c+=1-a/2:d+=c+' ':c*=c,c*=c!=-1&c!=256),c=0,d='')&&d Try it online!

posted 3y ago by Hakerh400‭

Answer
66%
+2 −0
Challenges Towering Cistercian Representation

JavaScript (Node.js), 606 bytes for(_="=>\\\\ =j(...(a:').join`\\n`[q](/aa),/ / / d[c[___) .match(/.{.||]/g,=='.mapf=(n,m=([a,b]a?m(b)+a',l=10000n,j=, b,c=0a-c?[b(cj,b,c+1)]:[],b=[q='rep...

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

Answer
66%
+2 −0
Challenges Generate Lewis Caroll's Jabberwocky

Bubblegum, 769 bytes 074cd1dc7fb6baed2f568915ffeb6aa5c775264a9a6f77eb418f0793da59b234599dadb6804269dbb5a213a05c807b0723f79512c284f46e8dbb6b0274f1b36606988b67ea58cf68beabe10f158702fcbf4c2b30d7b4f26...

posted 3y ago by Hakerh400‭

Answer
66%
+2 −0
Challenges Longest Increasing Subsequence

JavaScript (Node.js), 70 56 bytes f=([a,...b],c=f)=>1/a?Math.max(f(b,c),[a]>c&&1+f(b,a)):0 Try it online!

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

Answer
66%
+2 −0
Challenges Weave Strings Together

JavaScript (Node.js), 53 bytes f=(a,b=[],c=a.map(([a,...c])=>(b+=[a],c)))=>b&&b+f(c) Try it online!

posted 3y ago by Hakerh400‭

Answer
66%
+2 −0
Challenges Bytes to Segfault

JavaScript (Node.js), 35 32 25 bytes -7 bytes thanks to @celtschk‭ with(process)kill(pid,11) Try it online!

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

Answer
66%
+2 −0
Challenges Length of a Sumac Sequence

JavaScript (Node.js), 31 bytes f=(a,b)=>a<0?0:b<0?1:1+f(b,a-b) Try it online!

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

Answer
60%
+1 −0
Challenges Generalized Sort

Haskell, 29 bytes import Data.List foldr sortBy Try it online!

posted 2y ago by Hakerh400‭

Answer
60%
+1 −0
Challenges Tile pyramids on top of each other!

JavaScript (Node.js), 57 56 bytes f=(a,b='/\\')=>a--?''.padEnd(a)+b+` `+f(a,'/'+b+'\\'):'' Try it online!

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

Answer