« first day (2362 days earlier)      last day (2480 days later) » 

12:00 PM
@Mayube yes
 
Oh nice
 
35 secs ago, by totallyhuman
Oh nice
 
hmm damn, the set and union parts are easy in braingolf, but the intersection is gunna be a pain in the s
ass*
 
Sometimes I wish I could use string .replace=blahblah, like string += blahblah
Please make another CMC
I want to solve sth
 
@Mayube Is u set or deduplicate?
 
@Mr.Xcoder I fail to see the difference in this context
 
No, I mean in Braingolf in general
 
but anyways it has to be deduplicate
 
12:10 PM
deduplicate
 
braingolf only has ints
and stacks
 
@totallyhuman braingolfed
 
correct, and braingolf's stacks are python deques
 
hm i just made my own stack implementation
 
well technically the stacks are sdeques
which extends deque, but allows slicing
you can't do deque[:-1] , but you can do sdeque[:-1]
 
12:12 PM
Ok, gotta work on Cthulhu
 
¯\_(ツ)_/¯ my stacks don't need slicing
pop everything
or peek
 
I can't remember why Ineeded slicing
I think it was for [::-1]
 
@Mayube That's reversal
 
correct
 

 Development of Cthulhu

Room for the development of Cthulhu (github.com/Mr-Xcoder/Cthulhu
I will make a Strawpoll there soon ^
 
12:15 PM
The controller seems to be working with my test answers but I'd welcome any new test answers/ideas of what to test/feedback on the controller/spec:
2
Q: Ant Queen of the Hill Contest

trichoplaxking-of-the-hill javascript grid game Moved out of the sandbox into its own post to allow running the Stack Snippet with test answers. Please don't compete here (the contest will be posted to main soon) but feel free to post answers to test any aspects of the Stack Snippet. Please let me know ...

 
@trichoplax That's gonna be an epic KOTH.
3
 
This challenge will self-destruct in ten seconds. Good luck — frarugi87 3 hours ago
Wat
 
Vote in the strawpoll here
 
@PhiNotPi Thank you! It's been a long time coming...
 
12:23 PM
I'm considering increasing the number of moves to allow more exploration of the arena and more clashes between rival ants
 
Hmm I wish I knew js...
 
@Mr.Xcoder If you put the question in the link text, instead of just "strawpoll", people are more likely to click on it...
 
@trichoplax Done
@totallyhuman Time to learn js
 
@trichoplax holy hellbaskets this looks like one awesome KOTH
3
 
@totallyhuman If you mean for the KotH, you can look at the test answers to see the basic idea - it doesn't take full knowledge of JS to enter
 
12:26 PM
Ok I'll see
But it looks ridiculously awesome
 
@Mayube Thanks! Unfortunately I can't get it into a Stack Snippet but hopefully it will still work hosted externally. I'm looking forward to seeing what people come up with...
As long as you can all see the coloured regions spreading out as the ants move in the controller, then it should be nearly ready to post
 
yeah, the magenta one goes in a straight line and the green one goes around randomly making a sort of blob
so when you start you just have a queen, right?
 
Brilliant. I've tested it on Fedora with Firefox and Chromium, and on Windows with Internet Explorer and Edge, but I don't have a way of testing it on an Apple machine so if anyone does, I'd be interested to hear if it works
@Mayube Right. So until you find your first piece of food you can't make any workers
 
the post doesn't seem to specify that food is needed to create a worker, unless I'm missing something
 
@trichoplax It's hard to predict the right balance between number of moves and size of the arena. I think someone should write at least one basic "competitive" test bot, so that a full game can be run. Then we can see how much of the arena the competitive bot is able to take over / how much different colonies interact with each other.
 
12:31 PM
@Mayube Feedback on what is clear is exactly what I'm looking for. Even if something is mentioned but doesn't come across on a first reading, I want to fine tune it.
 
@trichoplax I'd recommend specifying the food requirement in the documentation for the type return value
also maybe specify that your script is run for your queen and all of your workers
And specify that returning type on a worker is invalid output (I assume it is)
 
@PhiNotPi I have written more competitive players in private, and 10000 moves is enough to spread out over a significant fraction of the arena, so if it gets 16 players it should be enough time for them to crowd each other. Extending further could lead to battles later since food can be stolen, so I'm trying to guess how much of this to allow for
 
I'm unfamiliar with KOTHs, can one person have more than one ant?
 
@trichoplax also are the 4 different types of worker just to allow people to group their workers? Or are there functional differences
 
@totallyhuman That's up to the KotH author - in this case I'm allowing arbitrarily many entries each, as long as they don't collaborate - they have to all be trying to win individually
 
12:37 PM
Ok thanks
 
@Mayube Thanks for that - I've edited to try and make that more clear.
 
@trichoplax i.imgur.com/w87Fyvu.png walk in a straight line guy gets pretty interesting after a while
 
@Mayube Yes I've been constantly surprised by how complex the behaviour can get with just very simple rules. Not always in a useful way though...
 
0
A: Sandbox for Proposed Challenges

Felipe Nardi Batistacode-golf Problem: I need to call my friends but my phone is not working properly. The only buttons I can press are [Up], [Down] and [Call]. [Up] and [Down] can be used to navigate in my recent calls. My phone can hold up to N recent calls and I know all the friends I need to call are in the li...

 
also because writing globals test never changes the color of a square, I have no idea where he is, but he's managed to find 2 food
 
12:44 PM
@Mayube Yes I didn't add any colour because it was just about testing that one thing so it didn't matter where it was. It actually follows the same kind of path as the random walk player, but finds slightly more food on average due to not having to waste turns on colouring the arena...
 
wait how does colouring waste turns?
 
> Since on average each piece of food is more likely to be in a dense region than a sparse region, a piece of food found at random is likely to be surrounded by more densely packed food than is found in general. This makes it worthwhile to search near previously found food even when the distribution is uniform. Is my thinking correct here?
A uniform distribution means that, if you find a piece of food at some location, then any other location near that food is just as likely to have food at any location further away.
 
-1
Q: Prime Factory Sum

0x45Task Find the first two primes above 1 million, whose separate digit sums are also prime. Example Take 23, which is a prime whose digit sum, 5, is also prime. Solution The solution is the concatination of the two numbers If the first number is 1,234,567 and the second is 8,765,432, your so...

 
@PhiNotPi That was my intuition, but then I thought that most food is in the clumped regions, so given that you have found one piece, the probability of being in a clump is higher. Sounds wrong but I can't work out why...
 
The optimal search strategy becomes one of covering as much ground as possible (based on ant vision, they only need to visit a fraction of the squares to view all of the squares).
 
12:49 PM
@PhiNotPi Do you think it would make for a more interesting competition if I made the food more clumped?
 
Python CMC: power set.
 
> The rumors of my death have been greatly exaggerated.
 
@trichoplax Clumps occur because the food isn't evenly spaced, some food is further away, and some are closer together, but these balance out.
 
from itertools import*;powerset
:P
 
@Mayube I've extended the sentence covering that under "Coding", all in bold. Does that cover it better?
 
12:52 PM
@AdmBorkBork Welcome back
 
But I'm not sure if it matters to make it more clumped, since there is already strategy is efficiently covering territory but also covering territory that is closest to the queen first.
 
Oh wait powerset's not a built-in
Huh
 
@PhiNotPi Yes I'm keen to keep it as simple as possible without becoming uninteresting. There's also the fact that other workers can steal from the queen and disrupt each other's paths, so perhaps I'll stick with uniform
 
@LeakyNun Can I make it a Pyth CMC for me?
 
12:57 PM
Actually, I think there might be a reason to make it more clumped, if you want the ants to perform more like actual ants where they search for food, and then establish a path for lots of workers to follow until they exhaust that food source.
 
@LeakyNun I just realised there is a built-in y, so...
@AdmBorkBork Welcome back!
 
@Mayube The worker types are just labels that each player can use however they see fit. So they can use it just to allow ants to distinguish each other, or they can write completely different code for different worker types - allowing for worker type 1 to be foragers and worker type 2 to be guards, or soldiers, or scouts, or whatever people come up with.
 
Just going off my intuition, paths right now are so you can find your way back to the queen (or so you can walk straight), there's not a reason for one worker to follow another worker's path.
 
lambda l:chain.from_iterable(combinations(l,i)for i in range(len(l)+1))
from itertools import*
 
@trichoplax if one of your ants runs into another of your ants, can it tell whether it's yours or not?
oh right friend
 
1:00 PM
@PhiNotPi Yes that's the thing. How much of ant behaviour do I want to include? Currently paths allow finding your way back to the queen, and avoiding going over the same ground twice, but there would be no point in advertising an area to other ants if the distribution is uniform. The only exception I can think of is if I'm a laden worker and I see food that I can't pick up myself, then I might want to communicate that
 
@Mayube Yes - they can tell the type (queen, worker 1, 2, 3, or 4), friend or not, and how much food is held
 
Yes well
 
I would actually be a fan of "tiny clumps" of food. Like, food tends to come in pairs, either adjacent or spaced 2 apart. This means that there's incentive to either remember where you've gotten one piece of food to get another, or to search with teams of ants.
But since the clumps are tiny (2 food) their overall distribution is still very even and won't accidentally favor one colony over another.
 
That seems like a good compromise. I need to think about this carefully
 
1:02 PM
No rules on return type so
And a chain object is iterable
 
@totallyhuman As you wish
 
@Mayube In short, each ant has as much information about its neighbours as it does about itself
 
@LeakyNun p=lambda s:[s[:1]+t for t in p(s[1:])]+p(s[1:])if s else[s]
 
@LeakyNun explain?
 
1:06 PM
@Mayube basically run the code above you
 
@BusinessCat #2recursive4me
 
Golfed by 2 bytes: p=lambda s:s and[s[:1]+t for t in p(s[1:])]+p(s[1:])or[s]
 
still2recursive4me..?
lol
 
Well I can't exactly use a loop in a lambda
 
nawh recursion is much cooler
just more complex
 
1:11 PM
CMC: Output a powerset with the inital list removed: [1,2,3] -> [[], [1], [2], [3], [1, 2], [1, 3], [2, 3]]
 
@trichoplax might be worth adding a test ant that attempts to reproduce as much as possible to test workers
 
@Mr.Xcoder mine still applies ^^
 
@totallyhuman Nope.
 
@Mayube Good thinking. I've tested workers privately, but I need to know they work when reading from an answer too.
 
oh wait nvm
 
1:12 PM
@totallyhuman Yours returns [(), (1,), (2,), (3,), (1, 2), (1, 3), (2, 3), (1, 2, 3)]
 
i had a different test case
lambda l:list(chain.from_iterable(combinations(l,i)for i in range(len(l)+1)))[:-1]
from itertools import*
 
@Mr.Xcoder Jelly, 4 bytes: ŒPḟW
 
@Mr.Xcoder Brachylog, 3 bytes: ⊇ᶠb
 
Honestly there's probably a shorter way
 
@BusinessCat In Jelly, there's always a shorter way.
@Mr.Xcoder Pyth, 2 bytes: Py
Wooohooo Pyth outgolfes (the current) Jelly and Brachylog!
 
1:15 PM
While it's still on meta rather than main, anyone is welcome to try to post an answer which breaks the controller, for testing purposes
 
Well that will always outgolf Jelly since powerset is 2 bytes
 
@BusinessCat Is there a Jelly built-in for all except the last element?
 
@Mr.Xcoder Jelly, 3 bytes: ŒPṖ
 
Oh yeah there is
 
no brachylog doesn't outgolf jelly
 
1:17 PM
@EriktheOutgolfer means all but the last one, right?
 
of course
it stands for Ṗop
 
@EriktheOutgolfer In Pyth, P is Pop
 
yeah I know
 
And obviously y is Powerset 
 
except in Pyth y is powerset >_<
 
1:17 PM
Wait the docs say is Pop; return z[:-1]
So why doesn't that return [1, 2, 3]?
 
Yes
Wut no
 
@BusinessCat [:-1] Not [-1]
 
Oh duh
 
[:x] All the elements until index x.
 
@BusinessCat that's for Ṫail, which both pops and returns the last element (yes it really pops in place)
 
1:19 PM
@EriktheOutgolfer There's t in Pyth as well :)
 
isn't that z[1:]?
 
Wait I can write brainflak on my calculator too
 
@EriktheOutgolfer Yes, it is. Didn't read your whole comment
 
All I need is (){}[]<> right?
For brainflak
 
Yes
You should write a Brain-Flak interpreter in TI-BASIC
 
1:22 PM
Now I need some crazy person to port the brainflak interpreter to ti-basic
Ninja'd
 
CMC: determine if a list of intgers has length 2 or 3
 
But no I'm most definitely not doing that
 
e.g. [4, 2, 3] is truthy, [5, 1, 3, 5] is falsy
 
@EriktheOutgolfer python, lambda a:1<len(a)<4
 
@LeakyNun Any suggestions on how to golf the above ^?
 
1:26 PM
Is there some kind of secret trick you're looking for? Cause this seems very basic
 
What's up
 
@totallyhuman just do the cmc :p
 
hey gamers
 
also cmc is usually way more basic than main challenge
 
@EriktheOutgolfer Pyth, 6 bytes: /r2 4l
 
1:28 PM
yeah that's the shortest I've been able to get to not anymore :p
 
Ok well I'd do jelly but I'm mobile
 
@EriktheOutgolfer Are you responding to my Pyth answer?
 
@Mr.Xcoder yes
 
@Mr.Xcoder Hey there! How's Cthulu going?
 
@ckjbgames Good. I added fibonacci stuff
@ckjbgames But I don't want to work on it today at all
@EriktheOutgolfer Hmmm....
 
1:29 PM
@Mr.Xcoder That means Fibonacci Sequence questions will be pretty easy
 
@ckjbgames Yes, 1/2 bytes
 
@Mr.Xcoder nice
 
@ckjbgames heh many languages have fibonacci builtins
 
I am starting a PR. I added bitwise not.
 
@ckjbgames No
I already added those
 
1:31 PM
@Mr.Xcoder oh
wil lyou delete that branch then
 
he can't delete the branch he can only close the pr afaik
 
@ckjbgames No, if you want to work on other things I won't
@EriktheOutgolfer I can delete the branch
 
@Mr.Xcoder It is behind master, tho
 
@Mr.Xcoder then again I've never been pr'd
 
I can ^
@EriktheOutgolfer Clever trick, I think I have it...
 
1:33 PM
show me
 
No, I don't
 
It ends up being longer
 
well basically isn't that space excruciating somehow?
 
@EriktheOutgolfer IDK
 
1:34 PM
I mean, it's making me sooo mad I wanna crush it away
and I did find a way to do that
 
@Mr.Xcoder We need a way for users to create their own functions
 
@EriktheOutgolfer Hint?
@ckjbgames I will add that another time. It's way too early for that
Cthulhu doesn't even have it own functions....
 
@Mr.Xcoder ok
 
Except for operators
 
@Mr.Xcoder Right. But for now, I am adding a builtin that will, at some point, call a function.
 
1:36 PM
@Mr.Xcoder well, just get rid of the space somehow...what does closely resemble r2 4 -> [2, 3]?
 
What are your printable characters again?
 
@ckjbgames Add it on that branch
 
@Mr.Xcoder ok
I need your printable characters though
 
@ckjbgames Use whatever you want
I can change that later
 
@Mr.Xcoder Will you send me the character that liooks like an "f" but isn't?
 
1:37 PM
yesterday, by Mr. Xcoder
1 hour ago, by Mr. Xcoder
43 mins ago, by Mr. Xcoder
@Adám µ˜∫√ç≈Ω¬˚∆˙©ƒ∂åπøˆ¨¥†®´∑œ÷≥≤æ«…‘“≠–ºª•¶§∞¢£™¡⁄€‹›fifl‡°·‚—±’”»ÆÚ¿˘¯Â˜ı◊Dz¸ÅÍÎÏ˝ÓÔ‌​Ò∏؈¨Áˇ‰´„Œ§ + standard characters
 
@Mr.Xcoder thanks
 
@ckjbgames I have already used all three of them
@ckjbgames Man, take a look over the master branch again
 
@Mr.Xcoder B
 
@LeakyNun ??
 
Look up what B does
 
1:39 PM
@Mr.Xcoder ok
 
> B <pfn> <any> <n-1:any> Bifurcate. Return two element list [B, A(B, ...)].
 
@Mayube Because each turn you can either move, or change the color of a cell, or create a worker. You can't do more than one of these things simultaneously.
 
@Mr.Xcoder yes
now make [2,3] in 3 bytes
 
@LeakyNun Thanks
/hB2l
 
1:41 PM
Hi, sorry I'm still here for this but I really wanna post it, so I'll post it later today. What do you guys think I can do for saying my 3rd rule clearly ?
0
A: Sandbox for Proposed Challenges

V. CourtoisLennyface parser and selector Your mission Create, in the language of your choice, a program that outputs a randomly selected lennyface (artistic minifigures, see this) from an input - a string composed of numbers and lennyfaces. You will have to : first, parse this input; second, extract a pro...

 
have you used the omega sign?
 
@ckjbgames No
 
@Mr.Xcoder cool
 
Yet again, if I already used a character I will change it before I PR
 
@trichoplax worker test doesn't seem to work, so far I've seen it get up to 2 food without spawning a worker
 
1:43 PM
CMC: Given A list, check if its length is 2 or 4
 
@Mayube Yes I forgot to put in the vital code to produce a worker... You might need to refresh the controller page to get the latest version
 
@trichoplax it's doing a great job of avoiding food though i.imgur.com/jxMDHdi.png
 
@Mr.Xcoder same method
 
@Mr.Xcoder How about it just returns the list's length
 
@LeakyNun I know, I already have 5 bytes
@ckjbgames No, the values must be constant
 
1:44 PM
@Mayube Hopefully real strategies won't ignore food that they get close enough to see, but I'm keeping it all deliberately simple for now :)
 
@Mr.Xcoder ok
 
question about the koth
 
leaving tnb for a moment, i'm still on ppcg
 
Pyth, 5 bytes: /yB2l
 
@Mr.Xcoder ->a{a.size} - returns 2 if the size is 2, returns 4 if the size is 4
 
1:45 PM
@Mr.Xcoder PowerShell, 17 bytes -- $args.count-in2,4
 
@trichoplax still doesn't seem to spawn workers
 
@JanDvorak Don't think that's valid
 
when I look at the live viewer, the dots don't seem to move continuously, they just jump all over the place
 
1 min ago, by Mr. Xcoder
@ckjbgames No, the values must be constant
 
@Mr.Xcoder I just chose to interpret the challenge differently than Adm did
 
1:46 PM
@Mr.Xcoder Maybe I'm misreading this - will the list length always be either 2 or 4?
 
@StepHen No.
CMC: Given a number, return the number of 1s in its binary representation.
 
@Mr.Xcoder brachylog, 4 bytes: Ċ|l4
 
fast :0
 
->a{a.to_s(2).count ?1}
 
@Mayube Not sure if it's because I didn't declare i as a var. Need to test that too...
 
1:47 PM
@Mr.Xcoder jelly, 2 bytes: BS
 
@V.Courtois That was for my previous CMC
 
@EriktheOutgolfer maybe this is a criticism of the CMC?
 
nope
as a golfer I just golf my solution
 
@Mr.Xcoder PowerShell, 53 -- ([char[]][convert]::ToString(+"$args",2)-ne'0').count
Might be able to golf a few
 
1:50 PM
@AdmBorkBork Haven't seen PowerShell answers since you left... Happy to see them once more
 
@Mr.Xcoder Python, f=lambda n:n and n%2+f(n//2)
 
Woo
 
@Mr.Xcoder Brachylog, 2 bytes: ḃ+ (pretty much the same as Jelly)
 
@JanDvorak I still don't get why Ruby has ?c for character literals
 
49 bytes -- ([convert]::ToString(+"$args",2)-replace0).length
 
1:51 PM
It's a perlism
 
@Mr.Xcoder It's kinda fun to be back to this
I missed all y'all
 
welcome back :)
 
@AdmBorkBork Why did you (leave?) in the first place?
 
I have severe depression and anxiety and had a bad reaction to a change in medication. But I've gone through a couple other revisions and am doing much better now.
 
@AdmBorkBork Glad to hear you better.
 
1:55 PM
Thanks. :)
 
Can anyone outgolf me on my own CMC (obviously Pyth), 7 bytes: /`.BQ"1 ?
Did I just kill the room?
 
@Mr.Xcoder 4 bytes
 
@LeakyNun I FORGOT there is j
 
Leaky, you're back, too!
 
1:59 PM
he's been back for... 1 month and a half or 2?
 

« first day (2362 days earlier)      last day (2480 days later) »