Activity for Hakerh400
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Comment | Post #281550 |
[31 bytes](https://tio.run/##LY7BDoIwEETv/YpJwwGiEj14IcEv0FOPSMim1tCohdgaIMZvxy162s28mdltyd/M/T7PFwoEVapK1eIKW6rkQT2u1TbP7WZXzw@yDiVYPDVIzxabA/pXUOF5dEjg226AxWoFWUDGuSgpV2UZYsu@Ftb5QE4bqMgUhtY8jcDfqkAZX5DvJa4h11yUxi8WzjC2f6TQIKRjMRWTj4Ex6vTLMFhk9jQYPVPdOU2B9/kL) (more) |
— | over 3 years ago |
Comment | Post #282440 |
[46 bytes](https://tio.run/##y0gszk7NyfmfZhvzP7okMTtVwVIlpSi/QKMoNTElOjNWUyVRWzuxJtNGNzGWK9FWydDE3MjUwtjMUul/bmJmnoKtQkFpSXBJkYKKQpqCnZ2tgoa2toJSTJ6S5v9/yWk5ienF/3WTCwoA) (more) |
— | over 3 years ago |
Comment | Post #282081 |
`[c,b]++g t` ---> `c:b:g t` (more) |
— | over 3 years ago |
Comment | Post #279642 |
@Arnauld. I didn't use that because the program would output an array instead of a string in case of an empty string. OP later mentioned that we don't need to cover empty strings, but I missed that. Thanks. (more) |
— | over 3 years ago |
Edit | Post #279642 |
Post edited: |
— | over 3 years ago |
Edit | Post #280885 |
Post edited: |
— | over 3 years ago |
Edit | Post #280885 |
Post edited: |
— | over 3 years ago |
Edit | Post #280885 | Initial revision | — | over 3 years ago |
Answer | — |
A: Word Set Square [Haskell], 110 bytes ```haskell 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! (more) |
— | over 3 years ago |
Comment | Post #280839 |
@Razetime Because when `x=0` the condition `(x<2and x)` evaluates to `0`, which is falsy, so `or` can't short-circuit. (more) |
— | almost 4 years ago |
Comment | Post #280860 |
`Math.sqrt` -> `**.5` (more) |
— | almost 4 years ago |
Edit | Post #280831 |
Post edited: |
— | almost 4 years ago |
Edit | Post #280831 |
Post edited: |
— | almost 4 years ago |
Edit | Post #280831 |
Post edited: |
— | almost 4 years ago |
Edit | Post #280831 |
Post edited: |
— | almost 4 years ago |
Edit | Post #280831 |
Post edited: |
— | almost 4 years ago |
Edit | Post #280831 |
Post edited: |
— | almost 4 years ago |
Comment | Post #280832 |
It fails for `"AC" "ABC"` (more) |
— | almost 4 years ago |
Edit | Post #280831 |
Post edited: |
— | almost 4 years ago |
Edit | Post #280831 | Initial revision | — | almost 4 years ago |
Answer | — |
A: Is it a near-anagram? [JavaScript (Node.js)], 150 71 bytes f=(a,b)=>a[b.length]?f(b,a):b.filter(x=>a[y=a.indexOf(x)]=!y).length-1 Try it online! (more) |
— | almost 4 years ago |
Edit | Post #280830 | Initial revision | — | almost 4 years ago |
Answer | — |
A: The Pell Numbers [Haskell], 21 bytes f=0:scanl((+).(2))1f Try it online! (more) |
— | almost 4 years ago |
Comment | Post #279456 |
[35 bytes](https://tio.run/##JY7BDoIwDIbvPMWyeETegIMREw8YPXgjHJoxoGFbl60SfXnnhKSHfv//Je0McdHGpITWU2DRAEPVYuRirBU5BVxxABc9RZ1YR46iFl0nF3QkS6nQaQt5sbSiln3ZSUWDzsFEZtz4ipnyPGcdduPy9gYcMJLbuPmAoUmcHm3Wzi/DuO5lKe9BzRAG2fdFYQFdPm7B34QP6Fgc/iBGsf2Vvmo0MMV0VN7/AA) (more) |
— | almost 4 years ago |
Comment | Post #280785 |
This seems very similar to https://codegolf.codidact.com/posts/279434, and some of the answers would [literally work](https://tio.run/##TY1LCoMwFEXnWcUddJDg66DVfhBcQlcQggTxVWmUkGT9TY2D4uhwf9zJxs/oXM4s5dQm1QbVTS3LUFU6GSVY9sViBMHoO21yGmOK6KAFoPWFcCXUhqAbwo1wN4b@SbFrQlO4ZxsfhOexc1gXbnsjxGLndftYrH/Bh3lNO... (more) |
— | almost 4 years ago |
Edit | Post #280764 |
Post edited: |
— | almost 4 years ago |
Edit | Post #280764 | Initial revision | — | almost 4 years ago |
Answer | — |
A: 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)=>(q =A[b])(229 bytes, because TIO uses an old version of Node.js that has a parsing issue when an arrow func... (more) |
— | almost 4 years ago |
Edit | Post #280745 | Initial revision | — | almost 4 years ago |
Answer | — |
A: Solve Goldbach's Conjecture [JavaScript (Node.js)], 87 bytes f=(a,b=2,c=a-b,d=(a,b=2)=>bd(++a)?a:e(a))=>d(c)?[b,c]:f(a,e(b)) Try it online! (more) |
— | almost 4 years ago |
Edit | Post #280702 | Initial revision | — | almost 4 years ago |
Answer | — |
A: Create an Alphabet Diamond [JavaScript (Node.js)], 78 bytes (m=(a,b=26,c=a(--b))=>b?[c,...m(a,b),c]:[c])=>m(a=>m(b=>(c=25-a-b)<0?32:c+65)) Try it online! (more) |
— | almost 4 years ago |
Edit | Post #280650 |
Post edited: |
— | almost 4 years ago |
Edit | Post #280650 |
Post edited: |
— | almost 4 years ago |
Edit | Post #280650 |
Post edited: |
— | almost 4 years ago |
Edit | Post #280650 |
Post edited: |
— | almost 4 years ago |
Comment | Post #280650 |
@rak1507 I updated the answer to cover the `[[0, 1, 0], [1, 0, 0], [0, 0, 0]]` case, but I think you need to provide a better definition of what you mean by "diagonal". From your examples I thought that that particular test case that you show should return 0 and not 1. You probably should provide mor... (more) |
— | almost 4 years ago |
Edit | Post #280650 |
Post edited: |
— | almost 4 years ago |
Edit | Post #280650 | Initial revision | — | almost 4 years ago |
Answer | — |
A: Longest parallel lines [JavaScript (Node.js)], 541 540 bytes for(='=>)==!(+==0h,.map(M,R(=1,,e,b	&&Nl=[-1,))s(n,=(a	a=u,v(i=g(z,u,f=(a,w,cs=Math.ma... (more) |
— | almost 4 years ago |
Comment | Post #280408 |
"in most" does not mean "in all". Many esoteric languages do not have a clear notion of what a comment is. (more) |
— | almost 4 years ago |
Comment | Post #280408 |
"The source may not contain comments" - that is unobservable. (more) |
— | almost 4 years ago |
Edit | Post #280623 | Initial revision | — | almost 4 years ago |
Answer | — |
A: 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! (more) |
— | almost 4 years ago |
Edit | Post #280378 |
Post edited: |
— | almost 4 years ago |
Edit | Post #280378 |
Post edited: |
— | almost 4 years ago |
Edit | Post #280378 |
Post edited: |
— | almost 4 years ago |
Edit | Post #280378 | Initial revision | — | almost 4 years ago |
Answer | — |
A: Truthify an array [JavaScript (Node.js)], 74 70 bytes Works for any number of dimensions. f=(a,z=[])=>a.map?.((b,c)=>z.push(...f(b).map(a=>[c,...a])))?z:a?[z]:z Try it online! (TIO uses an old version of Node.js that does not support the `?.` operator, but you can try the 74 bytes solution) (more) |
— | almost 4 years ago |
Edit | Post #280096 | Initial revision | — | almost 4 years ago |