« first day (2476 days earlier)      last day (2360 days later) » 

12:10 AM
1
A: Sandbox for Proposed Challenges

Conor O'BrienPyramid Scheme Negation ascii-art code-golf In my language Pyramid Scheme, there is a slightly funny construct: the empty triangle: ^ - When given no arguments, it returns 0. To generate one using this construct, we could use this: ^ /!\ ^--- - This simply passes 0 to the negation ...

getting ready to post this finally, any suggestions?
 
12:22 AM
@ConorO'Brien Look like warning triangles to me.
 
I suppose they do!
 
@ConorO'Brien 4 months later...
 
At least it wasn't in there for only a few hours ¯\_(ツ)_/¯
 
@ConorO'Brien Mine generally are. I generally sandbox when I'm not sure if something is a dupe or if creating test cases proves particularly difficult.
 
if you're going to use the sandbox, please at least leave it in there for 24 hours. it at least allows anyone who looks at the sandbox see it
 
12:29 AM
@ConorO'Brien I agree, but I'd say a week. Not everyone is available every day of the week. (E.g. I'm generally not around Friday-Sunday.) Also, what's the rush?
 
@Adám yeah, I usually leave mine in for at least that long, but it seems to be that many people here are impatient
 
Yeah...
 
12:47 AM
A Fibonacci word is a specific sequence of binary digits (or symbols from any two-letter alphabet). The Fibonacci word is formed by repeated concatenation in the same way that the Fibonacci numbers are formed by repeated addition. It is a paradigmatic example of a Sturmian word. The name “Fibonacci word” has also been used to refer to the members of a formal language L consisting of strings of zeros and ones with no two repeated ones. Any prefix of the specific Fibonacci word belongs to L, but so do many other strings. L has a Fibonacci number of members of each possible length. == Definition... ==
Does there exist a challenge for this yet?
Oh, nvm.
23
Q: An infinite FTW

DennisThe infinite Fibonacci word is a specific, infinite sequence of binary digits, which are calculated by repeated concatenation of finite binary words. Let us define that a Fibonacci-type word sequence (or FTW sequence) is any sequence ⟨Wn⟩ that is formed as follows. Commence with two arbitrary...

 
1:03 AM
0
A: Golf a number bigger than TREE(3)

tfbninjaBrain-Flak, 202 bytes ((()()()()()()()()()())({})({}){}())((()()()()()()()()()())({})({})({}){}()())(([][][][][])({})({}){})((([][][]())({})({})({})({})({}){}[()]))(([][]()())({})({})({})({})({})[()()]{})(([][][][][][][]){}) Try it online!

I get the very strong feeling that this answer does not work.
 
1:19 AM
1
Q: Pyramid Scheme Negation

Conor O'BrienIn my language Pyramid Scheme, there is a slightly funny construct: the empty triangle: ^ - When given no arguments, it returns 0. To generate one using this construct, we could use this: ^ /!\ ^--- - This simply passes 0 to the negation function. We can continue negating this result...

 
Any Pyth users in here that would like to briefly explain how to write a function that takes multiple inputs?
Lest I'm s'posed to take an array as a single input.
 
1:44 AM
 
haven't been here in a while
 
welcome back
 
i'm just that guy who likes python :3
 
Are you implying there's only one?
 
 
1 hour later…
3:08 AM
Hoping to get feedback on this; specifically, would it be improved if the challenge were to take in two digits and output (ASCII-art of) an actual domino?
I personally think that the pattern is interesting enough, and doing the same thing twice with a little extra in between is a bit redundant.
 
you know... is it even possible to do strategies in dominoes...
 
?
oh you mean the game itself?
 
i guess maybe it's just the dominoes that I've played, because there are variations i guess
 
yeah there are many variations
 
but it just feels like snakes and ladders
speaking of which
we should make a snakes and ladders koth
 
3:13 AM
um
 
is it just me
 
how in the world would the bots have any say in who wins
 
or does the player not make any decisions in snakes and ladders
it would just be the controller
 
that's the joke
 
3:13 AM
yeah, we'll get to that right after the candy land koth :P
 
though for real i think there's probably some way snake and ladders mechanics can be applied to an actual koth with decisions
speaking of koths, how about the one i'm going to actually make
but which like two people will play
;_;
 
on the other end of the spectrum would be a mario kart koth
hmm, othello could be fun
but that's also only a two-player game
 
how about a koth where the bots have to define a set of rules somehow
 
meta-koth
 
@HyperNeutrino so... nomic?
they'd need to know legalese...
 
3:19 AM
@DestructibleLemon After reading the wikipedia page which lists about 7 basic domino games (and links to a page full of them), I'm curious now, what was your variant like?
 
uh
just place down the pieces until you run out of pieces
somehow it feels like it was more dull than uno even
uno is sort of ok somehow
 
one game I really wanted to make a koth out of was pit
 
pit?
sounds familiar...
 
basically everyone (works best with 4-8 players) has 9 cards, each with some item on it (# of different items = # of players), and the goal is to trade with other players until you have 9 of a kind
It's really fast-paced though, like a stock exchange
 
also, if we're talking about koths, I'm going to repeat my suggestion that we should have a koth room
 
3:23 AM
I wasn't here when you first made that suggestion but I agree
 
thanks!
The nineteenth king?
or maybe just koth discussion
 
the 19th bot/player/idk, maybe just koth discussion
 
ooh reaction games with a koth
 
reaction games?
 
3:35 AM

 KOTH Discussion

for discussing possible koths, koths in construction, and koth...
 
@DestructibleLemon like games for reaction speed
 
4:07 AM
0
A: Sandbox for Proposed Challenges

Destructible LemonRaceTrack Arena KOTH king-of-the-hill (haven't come up with a very good title) this koth is inspired by the pen and paper game Racetrack. RaceTrack Movement Racetrack (and this racetrack-inspired koth) use a distinctive vector based movement system. all bots players are on a square grid. i...

 
4:25 AM
They made a liquid-cooled power supply. I see dark times and blown-up computers ahead.
 
 
1 hour later…
5:53 AM
dododo
Is there a quicker way to loop over a bunch of integers and output the number of 1's in their binary rep?
right now I've got it down to gets.to_i.times{p gets.to_i.to_s(2).count'1'}
now down to gets;$<.map{|l|p l.to_i.to_s(2).count'1'}
 
6:52 AM
I just stumbled across this question. And I'm a bit dumbfounded.
 
 
6 hours later…
1:05 PM
@WheatWizard Nowadays this would get downvoted to hell
 
1:39 PM
CMC: This. Only need to output one list. | My Jelly code is 12 bytes: Try it online!
 
Anonymous
@user202729 I'm fairly certain that's an NP-complete problem, as it should be reduceable to knapsack
 
@mınxomaτ Late answer: I do (in my free time, Brachylog is about 5k lines of Prolog though). Initially it's quite hard to get your head around it, but one day it clicks and you suddenly get it. If you want to learn it properly I recommend this page. If you're looking to use it professionally there are quite a few hurdles, mostly that there are few libraries, and few good developers
@Mego Why do you guys put so much ice in your drinks?
There's more ice than liquid water in my glass
 
Anonymous
@Fatalize Because ice is cheap and drinks are not. Greedy corporate restaurants want to increase their profits everywhere, so they dump a ton of ice in every drink, even if it's just water.
 
are they really greedy?
I got a bajillion fries at a fast food for like $2
 
fries cost like nothing
 
1:51 PM
well in France I probably would have paid 3 times as much for the same amount of fries
 
it's like just prepacked fries dumped in like 5-day old oil and fries are pretty much just potatoes and a crap ton of salt
 
@xnor can you explain your algorithm here: codegolf.stackexchange.com/a/146113/4162 ?
 
@HyperNeutrino Perfect description 10/10
 
Anonymous
Thanks to Idaho, we have more potatoes than we know what to do with. So potato prices are really cheap, and fries cost basically nothing to make. Also all of our portions are enormous, which doesn't help the obesity epidemic.
 
1:56 PM
yeah I noticed that
The biggest people I've ever seen in my life were at the mall yesterday
 
1
Q: Golf my "pre-golfed" C

Felix PalmenBackground For my code-golf submissions in C, I need a processing tool. Like in many other languages, whitespace is mostly irrelevant in C source (but not always!) -- still makes the code much more comprehensible for humans. A fully golfed C program that doesn't contain a single redundant whites...

 
Anonymous
Where in the US are you? That affects stuff like portion sizes a lot
 
Philadelphia
 
Anonymous
Oh right you answered that yesterday
 
Penguin memory not so good :p
 
Anonymous
1:58 PM
If you were in Texas, you'd think we were all insane
 
Anonymous
Penguin hasn't had his coffee yet :P
 
are you Texan?
 
Anonymous
Yep
 
So even Texans think Texans are crazy?
 
Anonymous
Yes
 
1:59 PM
hah
 
Anonymous
A "small" drink at Whataburger (Texas fast food chain) is 20 oz
 
"oz" insane confirmed
:p
 
Anonymous
0.6 L
 
lol
I'm yet to see a gun though, my US experience is ruined
 
Anonymous
A medium drink is 32 oz = 0.95 L, and a large drink is 40 oz = 1.2 L
 
Anonymous
2:01 PM
Gun ownership also depends a lot on the region. You see more guns in rural areas.
 
How can you even physically drink 1.2L in one meal?
 
holy crap how does one even drink 1.2 litres
that's like twice the amount of water I drink each day
 
@HyperNeutrino there's no way or you'd be dead
 
@orlp slightly exaggeration :P
 
or at least severely dehydrated
@HyperNeutrino not really though
0.6 litres a day is nothing
 
2:02 PM
or you're 2 years old
 
you easily sweat that
 
Hah, wait till they see a Big Gulp
 
Anonymous
A Philly suburb isn't going to have a lot of guns, because PA is (usually) a blue (liberal) state, and liberals are about gun control and less guns.
 
@orlp well it's not that hot here right now (canada, only time it's hot is like 2 months of summer)
 
Anonymous
Now in rural Texas, you can't walk 20 feet without tripping over a gun
 
2:03 PM
@HyperNeutrino that doesn't matter
 
Anonymous
@Fatalize A lot of people drink some of it, refill it, and then take them to go
 
Anonymous
Also Whataburger drinks are like 80% ice unless you pour it yourself from the dispenser
 
@Mego That's my kind of drink
 
American drinks are like Lays chips except it's ice instead of air
5
 
actually on second thought 1.2L is closer to about the same amount of water I drink in a day; probably significantly less though I hope
 
Anonymous
2:05 PM
I think part of the reason for the massive amounts of ice in drinks (at least in Texas) is due to how irrationally hot it gets in the summertime. You need lots of ice to keep drinks cold in the heat, but then you get a watered-down drink which is gross.
 
Anonymous
I drink around 2-3 L of water per day
 
@Mego it's either that or warm alcohol when you just want it over ice. :P
:P
 
Anonymous
@ThomasWard Most places I've been in Texas that serve alcohol keep bottles in a fridge until they're opened
 
American drinks be like
 
@Mego That only works so long as it isn't excruciatingly hot outside.
:P
 
2:06 PM
^^^ that better be fake
 
'tis why I like it up here in PA, it never gets that hot
 
@Mego I don't think I drink anything cold without massive amounts of ice :p
 
I usually eat the ice first
 
@Fatalize That is, but their 100-oz refillable jug (almost 3L) isn't fake
 
Anonymous
@AdmBorkBork A Big Gulp is 32 oz
 
2:07 PM
@AdmBorkBork lol. too bad that's fake xD
 
except then I stopped doing that when I got braces
 
@Mego Was thinking of a the gigantic jug
 
Anonymous
The largest is apparently the "Team Gulp" at 128 oz = 1 gallon = 3.785 L
 
@Mego codegolf.
 
drinking something as a team sounds... disgusting to say the least
 
2:10 PM
what's the point of a big drink if you get refills?
 
You have to walk to refill your drink
 
:p
 
He's not wrong
 
I almost said "Americans aren't that lazy" and then I rethought that sentence
 
Anonymous
2:12 PM
@orlp To take the drink with you when you leave
 
a lot of people probably are :p
I just realized that I have a stupidly high number of bronze badges given that I have absolutely no gold ones :P
 
Just log in every day for a year to get your gold badge
 
next person down the rep list without gold badges is ton hospel. I plan to make him top user by rep with no gold badges in the next few weeks :3
(bounties him 8 times) no that's not what I meant
@Fatalize see I'd have one if they didn't delete my account when I had a 97 login streak
I just need more code-golf tag score and I can get a tag badge
will probably take me a few years at this rate tho ._.
 
Anonymous
@HyperNeutrino Maybe you shouldn't have violated the ToS and signed up when you were under 13, then.
 
lol that's true
but I was 2 weeks off of being 15 at the time
so like if they deleted my account when I was still <13 that would make more sense
 
Anonymous
2:23 PM
It's not SE's fault that they did exactly what they said they would do in the ToS that you agreed to when you signed up.
 
well at least my account is safe from being deleted again now :P
 
famous last words
 
Anonymous
@HyperNeutrino The issue is that they had records of you from when you were < 13, so the only safe way (legally speaking) to fix the problem was to nuke your account.
 
¯\_(ツ)_/¯ I'm not too mad about it just that I lost a gold badge but oh well
also lost a few bad questions off my record because they got deleted and didn't get reassociated with this account
 
CMC: Make a bot that will give you the Fanatic badge. Input - your account details (including password if needed) / Output: Run for 100 days. / [code-golf]
 
2:27 PM
@NewMainPosts I foresee a super-upvoted solution in C, so kindly asking people to vote for the code and its content, rather than the language :P
 
You can use this stackapps.com/questions/7173/stack-exchange-global-flag-summary for fanatic badge =) Register at every site, run it every day for 100 days and get a lot of gold badges, 1 per site
 
Anonymous
2:39 PM
@HyperNeutrino Please think before you type, rather than removing a bunch of messages.
 
any quicker way to count squares between a and b inclusive?
a=int(input())
b=int(input())
print(int(b**.5)-int((a-1)**.5))
either in ruby, python, etc?
 
k sorry I misread the stackapps post and got the functionality backwards
 
Anonymous
@MarcusAndrews Quicker or golfier?
 
golfier
 
@MarcusAndrews You can get rid of two bytes using ~-a instead of (a-1)
 
2:41 PM
oh interesting
Actually gives me an error though
bad operand type for unary ~: 'float'
 
oh weird
 
4
Q: First-price sealed-bid auction

Colera SuIn this game, we will simulate a sealed-bid auction. Each auction is a 4-player game, consists of 10 rounds. Initially, players have no money. At the start of each round, each player will get $500, and then make their own bids. The bid can be any non-negative integer less or equal than the amoun...

 
@MarcusAndrews Yes. You can turn that into a lambda... lambda a,b:sum(int(k**.5)==k**.5for k in range(a,b+1)) --- Try it online!
 
that's much longer though
 
welp that only works if you bracket it which makes it no longer golfier
 
2:42 PM
I'm trying to go for shortest bytes period
ruby, python, etc
 
does ** have precedence over ~/-?
 
Anonymous
@HyperNeutrino Yep
 
seems like it
 
@MarcusAndrews Or move the -1 to the outside of the int(...).
 
oh ok that would explain it. whoops
@user202729 um. that doesn't work I think
 
2:43 PM
@MarcusAndrews Mine is much shorter (by 8 bytes)
 
using Python 2:
a=input()
b=input()
print int(b**.5)-int((a-1)**.5)
@Mr.Xcoder Input and printing are counted
 
Anonymous
@MarcusAndrews Does output need to be an int, or can it be a float?
 
int, since it's counting number of squares, a discrete quantity
between a and b inclusive
I do this with isqrt function
 
a,b=input()
print int(b**.5)-int((a-1)**.5)
 
a and b are on different lines
 
2:45 PM
Java People: any ideas as to why the heck would a webservlet stop processing requests? It processes the first 2 post requests, then doesn't process any posts after that.
 
ffs why does ** take precedence over ~-?
 
** > - actually kind of makes sense ish
 
hm apparently .isqrt isn't a thing in ruby
even though i see it in a few places, weird
50 bytes
a=gets.to_i
b=gets.to_i
p (b**0.5-(a-1)**0.5).to_i
 
@MarcusAndrews Can you flip the order of a and b? I.E take input with b\na
 
a=gets.to_i
p (gets.to_i**0.5-(a-1)**0.5).to_i
 
2:50 PM
a=input()
print int(input()**.5)-int((a-1)**.5)
@MarcusAndrews ^
 
why does the space between p and ( change functionality ._.
 
Because Ruby
 
@Mr.Xcoder Yeah that was the solution I ended up sticking with
How about this one, finding the largest m such that p^m <= n?
I am doing:
from math import*
n=input()
p=input()
print(int(log(n,p)))
using Mego's import advice from before
 
do we know anything about p and n
 
actually, I can make that shorter:
from math import*
print(int(log(input(),input())))
 
2:53 PM
can we confirm p>1 and n>0
 
yes
ruby:
p Math::log(gets.to_i,gets.to_i).to_i
37 bytes
can it be done shorter than this in Ruby?
 
lambda a,b:max(x for x in range(a)if b**x<=a)
 
I have to print too
and take in input
 
n=input()
p=input()
print max(m for m in range(n)if p**m<=n)
I don't think it can get a lot shorter without modules
 
You
Ugh
 
2:58 PM
Right now I'm at 37 ruby with the code above
 
You
I did the worst thing I can do
 
Alternatively, [m for m in range(n)if p**m<=n][-1]
 
rm -rf --no-preserve-root /?
 

« first day (2476 days earlier)      last day (2360 days later) »