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 Shaggy‭

120 posts
66%
+2 −0
Challenges Reduce over the range [1..n]

JavaScript, 25 bytes The function is called with f(g)(n), where g is a function. g=>h=n=>n-1?g(h(n-1),n):1 Try it online!

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

Answer
66%
+2 −0
Challenges Presumptuous base conversion

Japt, 13 bytes Takes input as a character array. mnG ìUrÔÄ ªUl Try it mnG\nìUrÔÄ ªUl :Implicit input of character array U m :Map n : Convert from bas...

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

Answer
66%
+2 −0
Challenges Collatz conjecture; Count the tries to reach $1$

Japt, 15 bytes É©Òß[U*3ÄUz]gUv Try it É©Òß[U*3ÄUz]gUv :Implicit input of integer U É :Subtract 1 © :Logical AND with Ò :Negate the ...

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

Answer
66%
+2 −0
Challenges Repeat the characters

Rockstar, 90 bytes listen to S split S listen to N O's"" while S roll S into C let C be*N-0 let O be+C say O Try it here - code will need to be pasted in; s goes on the first line of ...

posted 3y ago by Shaggy‭

Answer
66%
+2 −0
Challenges Repeat the characters

JavaScript, 36 bytes s=>n=>s.replace(/./g,`$&`.repeat(n)) Try it online!

posted 3y ago by Shaggy‭

Answer
66%
+2 −0
Challenges Repeat the characters

Japt -m, 2 bytes pV Try it pV :Implicit map of first input string p :Repeat V :Second input times

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

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

Japt, 10 bytes `HÁM, {U}! Try it The backtick decompresses a compressed string, the {} is Japt's string interpolation and U is the first input variable.

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

Answer
66%
+2 −0
Challenges Word Set Square

JavaScript, 76 bytes Outputs an array of lines. s=>[...s+=[...s].reverse().join``].map((c,x)=>s[-~x]?c.padEnd(x)+(x?c:``):s) Try it online!

posted 3y ago by Shaggy‭

Answer
66%
+2 −0
Challenges Multiply two strings

JavaScript, 37 bytes I/O as character arrays. a=>b=>b.flatMap(x=>a.map(y=>x<y?x:y)) Try it online!

posted 3y ago by Shaggy‭

Answer
66%
+2 −0
Challenges Multiply two strings

Japt -m, 5 bytes Takes input in reverse order. Sadly, Japt has no minimum built-in for strings. VcmUc Try it VcmUc :Implicit map of each U in the first input string V :Second inp...

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

Answer
66%
+2 −0
Challenges Juggler sequences

Japt, 17 bytes Needs some more work. É?[U]cßÂUp½+Uu:1ì Try it If there's a proof that the length of the sequence for any given n never exceeds n**3 then ... Japt, 14 bytes NcU³Æ=Âp½+UuÃâ ...

posted 3y ago by Shaggy‭

Answer
66%
+2 −0
Challenges Juggler sequences

JavaScript, 37 32 bytes Outputs a comma delimited string. f=n=>n-1?n+[,f(n**(.5+n%2)|0)]:n Try it online!

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

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

JavaScript, 20 bytes Outputs false for truthy and true for falsey. a=>a.some(x=>x-a[0]) Try it online! Outputs true and false as normal. a=>new Set(a).size<2 Try it online!

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

Answer
66%
+2 −0
Challenges Tile pyramids on top of each other!

Japt -R, 12 bytes õÈ"/\\"mpXÃû Try it õÈ"/\\"mpXÃû :Implicit input of integer õ :Range [1,input] È :Map each X "/\\" : Literal string m ...

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

Answer
66%
+2 −0
Challenges Reduce over the range [1..n]

Japt, 4 bytes Takes the operator as a string but would also work without modification using a function by assigning it to variable V. That can be done in the header by leaving a blank line and the...

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

Answer
66%
+2 −0
Challenges Guess the language! (Robbers' Thread)

Cracks Mark Girrafe's answer: Japt No way I wasn't getting this one! Even if the intended solution was Pyth. "Cops and Robbers Test it

posted 3y ago by Shaggy‭

Answer
66%
+2 −0
Challenges Gamer Meme Creator

Japt, 19 bytes Takes the artwork as an array of lines and the string as the second input. If we can require that the artwork be right padded with spaces on each line so they're all the same length...

posted 3y ago by Shaggy‭

Answer
66%
+2 −0
Challenges Guess the language! (Cops' Thread)

Japt, cracked by Razetime, 44 bytes ((Cops)&(Robbers))`¬ps „d žbÞ`¸ËhDÎmEgviuø Test it `...`¸ËhDÎmEgviuø `...` :Compressed string "cops and robbers" ¸ ...

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

Answer
66%
+2 −0
Challenges Golf a FRACTRAN interpreter

JavaScript, 44 bytes a=>g=n=>a.every(([p,q])=>(x=n*p/q)%1)?n:g(x) Try it online!

posted 3y ago by Shaggy‭

Answer
66%
+2 −0
Challenges Golf a FRACTRAN interpreter

Japt v2.0a0, 18 bytes The r÷ can be removed if we can take an array of floats instead. T=V£*Xr÷Ãæv1)?ßT:U Try it T=V£*Xr÷Ãæv1)?ßT:U :Implicit input of integer U and 2D-array V T= ...

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

Answer
66%
+2 −0
Challenges Diagonalized alphabet

Japt -R, 16 bytes This feels far too long for the task at hand - what am I missing?! ;Bó v ¬£14îUiX q Test it ;Bó\nv ¬£14îUiX q ;B :Uppercase alphabet ó ...

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

Answer
66%
+2 −0
Challenges 1, 2, Fizz, 4, Buzz!

Japt -R, 27 bytes Lõ@"FiBu"ò úz4 ËpXv°EÑÄìªX Test it Lõ@"FiBu"ò úz4 ËpXv°EÑÄìªX L :100 õ :Range [1,L] @ ...

posted 3y ago by Shaggy‭

Answer
66%
+2 −0
Challenges Merge two strings

Japt -h, 13 12 9 bytes à m+V kbU Try it à m+V kbU :Implicit input of strings U & V à :Combinations of U m :Map +V : Append V k :Filt...

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

Answer
66%
+2 −0
Challenges Are they abundant, deficient or perfect?

Japt, 11 bytes Could be 2 bytes shorter if not for a bug in Japt when trying to get the proper divisors of a number. õ üÈgXnXâ x Try it õ üÈgXnXâ x :Implicit input of integer U õ ...

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

Answer
66%
+2 −0
Challenges Evaluate a single variable polynomial equation

JavaScript (Node.js), 33 bytes a=>n=>a.reduce((o,x,y)=>o+x*n**y) Try it online!

posted 3y ago by Shaggy‭

Answer