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 »

Activity for Shaggy‭

Type On... Excerpt Status Date
Edit Post #283355 Initial revision over 3 years ago
Answer A: 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!
(more)
over 3 years ago
Edit Post #283344 Post edited:
over 3 years ago
Edit Post #283345 Initial revision over 3 years ago
Answer A: Getting perfect squares, differently
JavaScript (V8), 28 bytes for(x=y=0;;++y)print(x+=++y) Try it online!
(more)
over 3 years ago
Edit Post #283344 Initial revision over 3 years ago
Answer A: Getting perfect squares, differently
Japt, 9 bytes No infinite lists in Japt so we'll have to go with a recursive solution. ßOpTµJJµ2 Test it ßOpTµJJµ2 ß :Recursive call with (irrelevant) argument Op : Output with trailing newline (returns undefined and second argument is ignored) ...
(more)
over 3 years ago
Edit Post #283128 Post edited:
over 3 years ago
Edit Post #283310 Post edited:
over 3 years ago
Edit Post #283310 Post edited:
over 3 years ago
Edit Post #283314 Initial revision over 3 years ago
Answer A: 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, with each input integer on its own line)
(more)
over 3 years ago
Edit Post #283311 Post edited:
over 3 years ago
Edit Post #283311 Post edited:
over 3 years ago
Edit Post #283311 Initial revision over 3 years ago
Answer A: 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!
(more)
over 3 years ago
Edit Post #283310 Initial revision over 3 years ago
Answer A: 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
(more)
over 3 years ago
Edit Post #282293 Post edited:
over 3 years ago
Comment Post #281574 You might want to verify that that input format is acceptable.
(more)
over 3 years ago
Edit Post #283273 Post edited:
over 3 years ago
Edit Post #283275 Post edited:
over 3 years ago
Edit Post #283275 Initial revision over 3 years ago
Answer A: 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!
(more)
over 3 years ago
Edit Post #283273 Post edited:
over 3 years ago
Edit Post #283273 Initial revision over 3 years ago
Answer A: 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 then entering a function in the form `XY{X[op]Y}`, where `[op]` is the operator or method. õ rV ...
(more)
over 3 years ago
Edit Post #283171 Post edited:
over 3 years ago
Comment Post #283179 It also, unfortunately, fails on this point: "Output should be one of two _consistent_ truthy/falsey values"
(more)
over 3 years ago
Comment Post #283179 This fails for `0`, which should return a truthy value.
(more)
over 3 years ago
Comment Post #283231 Is `/` regular division or integer division?
(more)
over 3 years ago
Comment Post #283175 Can we take the operators themselves as a string input?
(more)
over 3 years ago
Comment Post #283137 No, the task is to output a truthy or falsey _value_. Any non-empty string is truthy.
(more)
over 3 years ago
Edit Post #283171 Initial revision over 3 years ago
Answer A: Guess the language! (Cops' Thread)
Jelly, cracked by m90 13 bytes Should be pretty simple - I'm running out of ideas; one of the downsides of only golfing in 2 languages! “¿×⁶ṆḶN{N=ȷṾ» Try it online!
(more)
over 3 years ago
Edit Post #283158 Post edited:
over 3 years ago
Comment Post #283160 Nice one, @#54118 :) I obviously didn't include enough red herrings; thought the extra `+` at the start of the brainfuck code to override the `x-y` might have thrown people, too.
(more)
over 3 years ago
Edit Post #283160 Post edited:
over 3 years ago
Comment Post #283135 And looks like you figured out the link, too :)
(more)
over 3 years ago
Edit Post #283135 Post edited:
over 3 years ago
Edit Post #283158 Post edited:
over 3 years ago
Comment Post #283140 Does it translate directly to Golfscript? If so, could you add a TIO for that? So's we can verify the results.
(more)
over 3 years ago
Comment Post #283135 Hope you don't mind my suggested edit ;)
(more)
over 3 years ago
Suggested Edit Post #283135 Suggested edit:

(more)
helpful over 3 years ago
Edit Post #283160 Initial revision over 3 years ago
Answer A: Guess the language! (Cops' Thread)
brainfuck, cracked by Aaron Miller, 243 bytes void main(x,y)->{ printf=io.write(z=x-y); printf("+++++[++++>---.+[--->++++.+.+++.+[---->++++.[->++++.+++++++++++++.----------.-[--->+-.>-[--->+---.--[--->+-.-------------..+++.+++++++++++++.+."); print "Cops and Robbers"; }
(more)
over 3 years ago
Edit Post #283107 Post edited:
over 3 years ago
Comment Post #283141 Are leading or trailing newlines permitted?
(more)
over 3 years ago
Comment Post #283107 I would credit you both, of course.
(more)
over 3 years ago
Comment Post #283157 A-ha! I knew it was one of the Cs but it was too fiddly to test them all on my phone when I saw that post.
(more)
over 3 years ago