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
85%
+10 −0
Challenges It's Hip to be Square

Challenge A catalogue type challenge that simply asks: Given an integer n (where n>=0) as input return a truthy value if n is a perfect square or a falsey value if not. Rules You may take...

20 answers  ·  posted 2y ago by Shaggy‭  ·  last activity 2y ago by Zakk‭

84%
+9 −0
Challenges Coat of Many Colours

Challenge Given a list of unique colour names as input, sort them in the order that they first appear in Joseph's Amazing Technicolour Dreamcoat. Example Input: green, blue, red, brown Outpu...

6 answers  ·  posted 2y ago by Shaggy‭  ·  last activity 2y ago by radarek‭

81%
+7 −0
Challenges In The Jailhouse Now

Challenge Given an integer n>=4 as input create an ASCII art "prison door"* measuring n-1 characters wide and n characters high, using the symbols from the example below. Example ╔╦╗ ╠╬╣ ...

6 answers  ·  posted 2y ago by Shaggy‭  ·  last activity 2y ago by snail_‭

Question code-golf ascii-art
80%
+6 −0
Challenges Partial Sums of Harmonic Series

Japt, 11 10 bytes >0©ÒßUÉ/°T Try it >0©ÒßUÉ/°T :Implicit input of integer U >0 :Greater than 0? © :Logical AND with Ò :Negate the bitwise ...

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

Answer
80%
+6 −0
Challenges Output 256 in many different ways

Japt, 27 Solutions This started out as a collaboration with Quintec but quickly got very out of hand! Posted with their permission. More solutions to follow. Hopefully! 256 Try it Just the b...

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

Answer
80%
+6 −0
Challenges Digit Sum Integer Sequence (working title)

Inspired by this challenge. If anyone has any suggestions for a song title I could use for the challenge title then please leave a comment. Definition We define f(x) for a given integer as the su...

6 answers  ·  posted 2y ago by Shaggy‭  ·  last activity 7mo ago by RubenVerg‭

Question code-golf sequence
77%
+5 −0
Challenges Evaluate a single variable polynomial equation

Japt -x, 6 5 bytes Ë*VpE Try it Ë*VpE :Implicit input of array U and float V Ë :Map each element D at 0-based index E * : Multiply D by VpE : V raised to the pow...

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

Answer
75%
+4 −0
Challenges Truthify an array

JavaScript (V8), 44 bytes a=>a.map((a,x)=>a.map((n,y)=>n&&print(x,y))) Try it online!

posted 3y ago by Shaggy‭

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

JavaScript, 28 bytes f=n=>n-1&&-~f(n%2?n*3+1:n/2) Try it online!

posted 2y ago by Shaggy‭

Answer
75%
+4 −0
Challenges Are All Elements Equal?

Japt, 3 bytes e¡g Try it e¡g :Implicit input of array U e :Is equal to ¡ :Map U g : First element of U

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

Answer
71%
+3 −0
Challenges The holeyest base

Japt -h, 19 18 bytes Gõ ñ@ìX xg#‘5#}4s3 Try it Gõ ñ@ìX xg#‘5#}4s3 :Implicit input of integer U G :16 õ :Range [1,G] ñ :Sor...

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

Answer
71%
+3 −0
Challenges Presumptuous base conversion

Python, 45 bytes I am not a Python guy at all, so I'm quite proud of this. I'm sure, though, there's something simple I could be doing to save myself a few bytes! lambda n:int(n,int(max("1"+n),...

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

Answer
71%
+3 −0
Challenges Make $2 + 2 = 5$

Japt -x, 6 5 bytes Takes input as an array of integers p!UdÍ Try it p!UdÍ :Implicit input of array U p :Push ! : Logical NOT of Ud : Any true (not zero) when ...

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

Answer
71%
+3 −0
Challenges Generate Lewis Caroll's Jabberwocky

Japt, 610 606 bytes Don't think there's anything more that can be done with it than this. 933î`'T°s ߍ¦g, „d e sҐy ‘vƒ Did gyœ „d g‹½e ˆ e °¼; A¥ Úßy ØÀ e ޒgovƒ, A˜ e Ú  ÎÈs ŒtgŸ¼.0"BeØ ...

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

Answer
71%
+3 −0
Challenges Are All Elements Equal?

Rockstar, 76 bytes Takes individual integers as input. listen to f let n be f o's1 while n let o be o and n is f listen to n say o Try it (Code and input will need to be added manually...

posted 2y ago by Shaggy‭

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

Japt, 4 bytes P1 is: +"+U Try it Which outputs P2, where N1 is the input from P1: N1+U Try it

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

Answer
71%
+3 −0
Challenges Word Set Square

Japt -R, 16 15 14 bytes pÔ¬Ëú°EDùEÃÆpÔ Try it pÔ¬Ëú°EDùEÃÆpÔ :Implicit input of string p :Append Ô : Reverse ¬ :Split Ë ...

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

Answer
71%
+3 −0
Challenges Length of a Sumac Sequence

Japt -N, 9 bytes ¨T©ÒßVVnU Try it ¨T©ÒßVVnU :Implicit input of integers U & V ¨ :U is >= T : 0 © :Logical AND with Ò :Negate the...

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

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

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

posted 2y ago by Shaggy‭

Answer