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‭

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

Cracks Mark Girrafe's answer: F# printfn"Cops and Robbers" Try it online!

posted 3y ago by Shaggy‭

Answer
66%
+2 −0
Challenges Sort letters by height

Japt, 23 16 15 13 bytes Lexicographical sort using the custom alphabet tipbdghkflyqj. I/O as characters arrays, sorts in ascending order. n`“pbdghkf§qj Try it

posted 1y ago by Shaggy‭  ·  edited 11mo ago by Shaggy‭

Answer
66%
+2 −0
Q&A Up to date JavaScript Try-It-Online

There is a new project called Attempt This Online intended as an alternative to TIO. It's pretty nascent so doesn't yet support the same volume of languages as TIO and the only version of JavaScrip...

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

Answer
66%
+2 −0
Challenges 8 coexisting queens

Japt -R, 16 15 bytes Uses spaces for #s and "s for Qs. ##Ë64ì £QùXÄÃy Test it (footer reformats the output to use the characters from the spec) This one uses 1s for #s. ##Ë64ì £#ÿ¤hXQ ...

posted 1y ago by Shaggy‭  ·  edited 1y 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 2y ago by Shaggy‭  ·  edited 2y 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 2y ago by Shaggy‭  ·  edited 2y 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 2y 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 2y ago by Shaggy‭  ·  edited 2y 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 2y ago by Shaggy‭  ·  edited 2y ago by Shaggy‭

Answer
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 2y ago by Shaggy‭  ·  edited 2y 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 2y ago by Shaggy‭  ·  edited 2y ago by Shaggy‭

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

Rockstar, cracked by Hakerh400, 126 bytes I never thought of languages that would ignore everything except the strings - I should have stated that the solution should be irreducible. Hakerh400 get...

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

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

Cracks Mark Girrafe's answer: Rust fn main(){print!("Cops and Robbers")} Try it online!

posted 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 3y ago by Shaggy‭  ·  edited 3y ago by Shaggy‭

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

Cracks Quintec‭'s answer: Canvas My first clue was the echp; if the language used echo then why wouldn't it error on that? The second clue was that the last line contained the exact output we need...

posted 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 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 2y 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
66%
+2 −0
Challenges Truthify an array

Japt -m, 8 7 bytes ð òÎmiV Try it ð òÎmiV :Implicit map of each sub-array at 0-based index V ð :Indices of truthy (i.e., non-zero) elements ò :Partition between eleme...

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

Answer