« first day (1893 days earlier)      last day (2952 days later) » 

4:00 PM
So we want some sort of compromise where you have to do a few more lookups but don't need to store so much data?
 
anything below O(N^2) memory, and faster than dijkstras
 
@NathanMerrill what does the graph look like?
 
highly connected
 
can any node be connected to an arbitrary amount of other nodes?
ah
 
yes
a diameter of, say, 10
(the example I'm using is Linkedin, but it could also apply to facebook)
 
4:02 PM
Are you only looking for a single pair? In that case, BFS is already shorter than Dijkstra's -- O(E+V) vs O(E+VlogV)
 
@NathanMerrill what you can do
is split up the graph in k disjoint sets of nodes
 
oh, my bad. I did mean BFS
 
@NathanMerrill then you do the bruteforce algorithm that computes the shortest distance between each pair of the k clusters (k^2)
and stores with each pair the entrance/exit nodes
then when you actually need to compute the distance between 2 nodes, you find which cluster they are in
then look up the distance between the clusters
 
that's assuming you can find disjoint sets
 
For cases where there are more than one entrance/exit with the same distance, do you need to store them all?
 
4:06 PM
for a highly connected graph, I'm not sure those exist
 
@NathanMerrill you misunderstand what I mean with disjoint
 
@trichoplax no. you don't even need the path, simply the length
 
just make sure one node is in exactly one sub cluster
how it is connected is irrelevant
 
@NathanMerrill I see this - but the path length through the cluster will be affected by the choice of entry and exit nodes
 
@Neil It does. THANKS A LOT!!!
 
4:08 PM
you turn the question "dijkstra A -> B" into "lookup cluster for A and B (Ac, Bc), lookup distance and enter/exit nodes Ac -> Bc, lookup distance A -> exit(Ac), lookup distance B -> enter(Bc)"
 
@orlp lets assume that you are able to cluster people such that there are no overlaps (which I'm not sure is possible)
 
@NathanMerrill is it really that hard to split up a set of nodes?
 
@NathanMerrill The shortest path from a node in cluster A to a node in cluster B going via cluster C may use different entry and exit nodes for C than the shortest path from D to E going via cluster C, and the path length through C could therefore be different
 
@NathanMerrill I mean vertex disjoint, not edge disjoint
 
I'm going to be naming nodes A1 to refer to node 1 in cluster A
lets say that the shortest path from A to C is A1 B1 C1
but I want to find the path from A2 to C2
where there's another path, A2, D1, E1, C2
 
4:12 PM
WTF WE WERE TALKING ON-TOPIC A FEW MINUTES AGO??
damn, I missed it
 
but your algorithm would give A2, A1, B1, C1, C2
 
@Optimizer This is the same topic continuing...
 
ohhhhh
phew
 
@Optimizer Kittens, politics, isn't this game amazing, oo look xkcd
 
@Optimizer Did your garden grow anything new?
 
4:14 PM
as i said.
 
@NathanMerrill maybe they do need to be edge disjoint
 
it resets every 15-20 minutes
 
nvm
 
left it long time back
 
@Optimizer I had to open mine it a separate browser window to prevent resetting
 
4:15 PM
i actually did that only
from the start
new chrome window
 
@xnor I get the feeling... you can drop 6 apostrophes in that Python answer
 
@NathanMerrill it can still speed things up though
@NathanMerrill it provides an upper bound on the distance, pruning the search
 
sure, but if you're doing BFS, I'm not sure if you need a prune
 
@NathanMerrill that's why you do DFS
err nvm
but even in BFS it prunes
 
@Optimizer The other thing you can do is copy the url and then you don't need to leave the browser open - it will keep growing server side and you can just check back in on it using the url
 
4:16 PM
the url was always the same for me
so it was resetting server side too
 
sure, but a BFS would find the node before hitting the pruning
that said, providing a prune for a dfs is very useful, because dfs doesn't have the same massive memory requirements
 
Are you already considering the BFS starting from both nodes simultaneously?
 
oh, no. that does appear to be more efficient intuitively though
though I couldn't prove it
 
Should only take X/2 steps instead of X steps for path length X
But checks more nodes each time
 
@xnor And a pair of parens
 
4:20 PM
but the branching factor is what matters
(N/2)^X + (N/2)^X < N^X
 
For a fixed branching factor F you'd have 2F^(X/2) instead of F^X, which sounds better for any but very small X
 
It's really quite ironic that "TheDailyWTF"'s servers are almost less reliable than the hardware the actual WTFs are about.
I find myself reading the site through Waybackmachine more than the actual site.
 
3 hours till the election ends...
@QPaysTaxes In python?
hm
@Doorknob ^^^^^^
 
@Sp3000 hmm?
 
4:24 PM
@NathanMerrill The reason I asked about starting from both nodes is that I was wondering whether a stochastic approach starting from nodes in the middle would give an expected speed up. Even though you'd have no idea if the extra selected nodes happen to be on a shortest path, they'd still speed up finding a path, provided you can then cope with that not being shortest and go from there
 
@Sp3000 oh, yeah, you don't need those parens
i thought operator precedence would fail
 
@xnor I believe lambda s:eval("s"+".replace('%s','')"*4%([],(),{},'<>')*len(s))=='' works, is what I mean :)
 
ohhh
that's funny
 
@orlp oooh
 
@Sp3000 crap forgot about eval
@Sp3000 () is a syntax error though
wait
 
4:26 PM
() is empty tuple
 
@trichoplax its a good idea. I'm not sure how the "coping" step would work
 
it's not?
I've been lied to!
damnit
right, (1,) is a single element tuple so for some reason I thought (,) would be empty tuple
so I tried that and nope
 
@NathanMerrill Nor me...
 
@orlp ah, that article solves the problem I was talking about before. It finds the shortest path from each node to each cluster
and the shortest paths from cluster to cluster
 
@Sp3000 thanks
 
4:29 PM
smart
 
@orlp Python? Can you just use () for an empty tuple? Seems to work
 
:) it's amusing because the CJam answer also gets to save a few bytes by not having the four brackets in a single string literal
 
@trichoplax ye
 
@orlp I think the only reason for the (1,) notation is because (1) is equivalent to 1. () doesn't cause that ambiguity so it's fine
 
@trichoplax not really, try [1, 2,] :)
it's trailing comma notation
(but it has that as a use, yes)
 
4:31 PM
I'm a liar.
 
@Morgan'Venti'Thrappuccino Never mind then :)
 
I'm very surprised that works.
 
@orlp So you just need to convince them to add leading comma notation and then (,) will work...
@Morgan'Venti'Thrappuccino I wasn't sure myself - I had to go and try it before suggesting it...
 
Yeah, I had to run type(()) in the REPL.
I would've assumed it was a SyntaxError, or a generator.
 
I must admit my checking wasn't quite that rigorous...
 
4:36 PM
^ every developer ever
 
which is the #1 reason I won't write a language. I hate writing tests
I love assuming that my code works the first time
 
^ every developer ever
 
You just need to recruit a new user generous volunteer to write all your tests for you...
 
>>> str.__dict__[dir(str)[70]]("   test  ")
'test'
 
4:39 PM
0
Q: Permutations of n digits with no repeating digits

DavisDudeYour program must take an input (n for the purpose of description) and output all permutations of a number that is n digits long with no repeating digits, where each of the digits preceding and including its index are divisible by the place in the number that it falls. Rules: No digits may be ...

 
My plant pot grew 4 stars
 
your tree grew a pot which grew a plant which grew stars..
what next? earth?
 
@Optimizer no, mercury.
 
HOLY SHIT
MY GARDEN GOT A GOAT
it's perfect, I'm leaving it like that
 
that's not a goat
 
4:49 PM
@Optimizer yes it is
 
no
 
a deer?
 
ears are different
 
Look at the URL.
 
4:49 PM
@Optimizer it's a baby goat
 
@orlp lol see above
 
see?
 
dude.. even after proof .
 
http://xkcd.com/1663/art/deer-1.png
 
I have my goat on an office desk o_O
 
4:50 PM
@Sp3000 +1
 
goat-ish thing
 
@Optimizer no need to get rude :( I'm just messing around
of course I know it isn't a goat, but it's a meme
goats are popular around here, you know
 
Deer makes sense, I was wondering what that was
 
ok
 
I also have a mini Washington monument it seems
 
4:51 PM
honestly it looks more like a llama
 
-_-
 
Does anyone know if it is possible to write something like P ::= 'print' (',' E)* in Chomsky normal form without making more than 2 symbols?
 
@QPaysTaxes golfed? Probably a[1]?a:a[0]. In real code? args = args.first if args.length == 1
 
@Downgoat I don't think that does what you want it to, but no
are you sure you want print , 10 , 30?
 
@QPaysTaxes sure, once I get home today
 
4:59 PM
@orlp oh :|
 
instead of print 10, 30
 
I meant P ::= 'print' E(',' E)*
 
you allow an empty print statement?
 
no
doesn't python? it does
I think I can write that with only two symbols
 
I'm so happy that exists now. It's so much easier to search for KOTH questions/answers.
 
5:02 PM
0
Q: A cycle of quine-like programs

wythagorasThis question asks you to write n programs, such that program 1 outputs program 2, program 2 outputs program 3, ... program n-1 outputs program n and program n outputs program 1. However, not all of these programs have to be the same language. You can use built in quine functions, because I do...

 
@mbomb007 isn't it ?
yeah, they are synonyms
 
@NathanMerrill Yes.
 
I think this should do it:
 
The point is that you can now type "koth" instead
 
P  -> print E P'
P' -> , E P'
      ε
 
5:03 PM
Somebody golfed the tag
 
@trichoplax I suggested the synonym. :D
 
@mbomb007 Good work :)
 
@Downgoat not CNF
 
I got a quote for koth.com
any guesses?
 
5:04 PM
P' is not the starting symbol and has a lambda production
 
$1m?
 
bit lower. 25K
 
@orlp it's close enough I think
 
sec fixing
@Downgoat no it's not
CNF is rather strict
 
which, unfortunately, is way out of my budget
 
5:05 PM
@NathanMerrill Then don't go for .com... Koth.rocks is pretty cheap.
 
@orlp e ::= 'e' <- looks like evil left recursion
 
I don't understand the 4 close votes on that quine challenge. Can someone explain?
 
print_statement ::= 'print' | print elist
print ::= 'print'
elist ::= 'e' | e elist_cont
elist_cont ::= comma elist
e ::= 'e'
comma ::= ','
there, now it should be fixed
 
I also found this awesome site:
 
print, e and comma are just proxy nonterminals
 
5:06 PM
Hello @all
 
@Downgoat perhaps you didn't mean CNF?
because CNF is rarely hand-written, and only used in certain constructions, usually
 
@MartinBüttner The dupe you found looks like the better dupe target, but if I vote now, it will show both dupe targets.
 
@orlp no, I didn't... brb checking my terminology...
 
@NathanMerrill Was not expecting that to be about actual hills...
 
5:07 PM
@Downgoat CNF is a special form that is super simple but just as powerful
 
King-of-the-hill.info is only $2.99
 
not golfy enough
 
a production may only be A -> B C or A -> terminal, and only the start symbol may have a lambda production
 
ok, got it.
 
@DrGreenEggsandHamDJ Hello @all/part
@NathanMerrill I found a lot of domains named ppcg koth. Apparently, ppcgkoth.com is free.
 
5:14 PM
ppcg-koth.ninja
why isn't there a ppcg-koth.pirate
 
@NathanMerrill Because pirate sounds like a copyright violator. :-P
@NathanMerrill I incidentally have minesweeper.ninja and I'm launching my product soon. :-)
 
oooh, there's ppcg.io
which is shorter than ppcg.com
 
Side garden note: I have no idea what invisible thing the circle's trying to highlight
 
Language Learning just entered private beta
 
@Downgoat It has 0 questions right now. 0_0
 
5:20 PM
no one's there :/
 
0
Q: Tips for King of the Hill challenges

Mwr247Inspired by this question, what are some tips you guys have for creating king of the hill challenges? What are some things to keep in mind in the planning and implementing of the rules and the controller, and advice on what makes for a good challenge?

 
There are exactly 30 users atm.
This might be the only time I have >= downgoats rep.
 
I want to post the first question...
but I don't want the first question to be closed...
 
why do domain registrars raise the price according to shorter names
 
@NathanMerrill Because you're using a shitty registrar? ;-)
 
5:23 PM
@Downgoat Who's gonna close it? You said yourself like no one is there.
 
shorter name = higher demand
^^^ that too
 
obviously there is greater demand, but if I was a registrar, I could simply undercut them
@ChrisJester-Young I can't find one that doesn't
 
@TimmyD true, can I post a question from the defintion page?
 
I've no idea. I only joined SE like 9 months ago.
 
@NathanMerrill Are we still talking about ppcg.io?
 
5:26 PM
yes
 
@NathanMerrill My registrar charges $35 for all .io names; not pricier for shorter names.
 
that's still cheaper than the 60-80 I've been seeing
but to a registrar, .io isn't more complicated than any other domain name, right?
 
Shouldn't be.
 
so, I guess with a free market, you'd have higher prices for parked domains (which makes sense), but you really shouldn't see higher prices for unparked domains
 
Different registrars have paid for licensing the various domain suffixes
And so charge differing amounts
That's likely why you're seeing .io be more expensive than a similar .com
 
5:33 PM
hmmm, apparently, .io refers to the British Indian Ocean Territory
its a country code
 
The cheapest TLD atm is xyz (<$3). Of course the best registrar for anything is internet.bs (Yes, I went through Namecheap, Godaddy, etc. pp., I.BS beats all of them, usually in price, but also in customer service and available features).
 
British Indian Ocean??
 
thatonenavyshipsailingbyitself.io
 
so im back after a busy weekend. and i have a brief reprieve at work.
is there anything i should change about this before posting it as a question?
 
ppcgkoth.com is available from GoDaddy if you buy a pack of four unrelated domains (five in countries with a national TLD).
 
5:36 PM
@Dragonrage isn't Unikong deterministic?
 
@zyabin101 Why is it only available if you buy more domains?
 
@ChrisJester-Young Well, I think it's just recommended to buy more domains.
 
@NathanMerrill i dont think so?
 
ppcgkoth.com is $8.49 (.xyz is $1.99)
 
oh well maybe.
 
5:39 PM
Of course, one could always use one of the freenom domains, which are free
 
Welcome to chat @TickTock! Sandbox, challenge sandbox.
 
Anonymous
@mınxomaτ tk domains are free through Freenom, though their customer service is virtually non-existent
 
why do you want customer service?
I mean, you do it once, and then you're done, right?
 
Anonymous
in case when something goes wrong
 
@Mego All freenom domains are free, not just tk.
 
5:41 PM
right, but what goes wrong?
 
Anonymous
@mınxomaτ I didn't know they had other domains than tk
 
Anonymous
@NathanMerrill Their DNS service is flaky at best
 
Anonymous
In reality it's just an example of getting what you pay for
 
Your best chance with Freenom is to set an A record (forget about anything else working) and forget about it :-)
 
Anonymous
Or just don't use Freenom :P
 
5:43 PM
@mınxomaτ have you tried google domains?
 
Anonymous
@ChrisJester-Young I tried to register with Slack via the email you sent me, but Slack is just spinning after I clicked next :P
 
Anonymous
Oh there it goes
 
Wait, the slack link is out?
 
why are we using slack?
 
@NathanMerrill It's a Slack instance for my new company.
 
5:45 PM
ah :)
 
@Mego Try again until it works. :-)
@NathanMerrill Wanna sign up? Email me at cky@cky.nz :-)
 
Anonymous
That's the approach I used
 
Anonymous
If at first you don't succeed, F5
 
@NathanMerrill $12 a year minimum is way to expensive. Plus some DNS record types are missing, the nameserver cache is too big (ibs doesn't cache, everything applies instantly) and I like to use the free WHOIS protection sometimes ;-)
 
5:47 PM
@Mego Caching.
 
I'm looking in the sandbox...there are so many KoTHs being posted
 
Anonymous
@TimmyD CacheKiller
 
Fear is the CacheKiller.
 
@ChrisJester-Young Sent you a mail.
 
@Sp3000 Okay, I was wrong: the rectangle detection challenge is interesting in Grime. I'll post an answer soon.
 
5:49 PM
:P I was thinking it would be, because of how it constructs rectangles
 
Who's slacking? :P
 
Anonymous
All of us
 
every developer ever
 
> We all slack. All of us. Not one of you is exempt.
 
5:52 PM
@Optimizer "My code is compiling."
 
@mınxomaτ Responded. :-)
 
@ChrisJester-Young Re-Responded :P
 
Anonymous
@Dragonrage I have that shirt :)
 
Anonymous
 
Anonymous
Clipboard why do you keep doing this
 
5:55 PM
so i guess since no one has said anything about my proposal, i shall assume it is in an okay enough stay to post as a question
 
Anonymous
What proposal?
 
Arguments from silence are terrible. For example, I have no idea what you are talking about, and you thus conclude that I am okay with it.
 
Anonymous
^
 
20 mins ago, by Dragonrage
is there anything i should change about this before posting it as a question?
 
I can die happy: a penguin gave me a caret
 
5:56 PM
@CᴏɴᴏʀO'Bʀɪᴇɴ you just stole his nose.
 
Anonymous
"Because nobody in this empty room has objected to me kicking puppies, I shall go stretch my legs in preparation."
 
@CᴏɴᴏʀO'Bʀɪᴇɴ It's how a lot of international agreements happen. Silence implies consent.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ you're back from suspension! \o/
 
@zyabin101 yeah! :D
@TimmyD How true... sighs
@Dragonrage oh noes
 
Anonymous
@Dragonrage Oh that, yeah looks good
 
5:57 PM
@CᴏɴᴏʀO'Bʀɪᴇɴ Oh nose?
 
@TimmyD You, sir, are good ;)
@Dragonrage Looks a tad vague, but that's probably just me.
 
@TimmyD Oh neos
 
What are your favorite/essential vim plugins?
 
@CᴏɴᴏʀO'Bʀɪᴇɴ hmm, anything i can do to clarify?
 
@DrGreenEggsandHamDJ emacs
 
5:58 PM
Why am I getting so much SU rep today?
 
@Optimizer Ninja'd me by a hair.
 
Anonymous
Gah I can't upvote anything
 
@Dennis stumble upon?
 
Anonymous
Chrome is being crappy
 
@DrGreenEggsandHamDJ I use vanilla Vim.
 
Anonymous
5:59 PM
@DrGreenEggsandHamDJ atom
 
@Dragonrage I just don't know how to answer your challenge, like how the program will read the variables etc.
 
@Optimizer Super User
 
Anonymous
@CᴏɴᴏʀO'Bʀɪᴇɴ It's all Javascript
 
@Dennis Stack Underflow?
 
5:59 PM
Close enough.
 
old but gold
 
@Mego I got that. I looked at the src, and it seems that everything is local--unavailable.
 
Slack Underflow?
 

« first day (1893 days earlier)      last day (2952 days later) »