« first day (1897 days earlier)      last day (2937 days later) » 

Anonymous
6:00 AM
Tu quoque isn't a valid argument
 
Anonymous
Appeal to hypocrisy
 
Anonymous
I was referring to your earlier comment about how "other people do it too"
 
Anonymous
Tu quoque (/tuːˈkwoʊkwiː/; Latin for, "you also") or the appeal to hypocrisy is an informal logical fallacy that intends to discredit the validity of the opponent's logical argument by asserting the opponent's failure to act consistently in accordance with its conclusion(s). Tu quoque "argument" follows the pattern: Person A makes claim X. Person B asserts that A's actions or past claims are inconsistent with the truth of claim X. Therefore X is false. An example would be Bill: "Smoking is very unhealthy and leads to all sorts of problems. So take my advice and never start." Bill: "I'm going to...
 
Anonymous
Failure to always apply the rules correctly does not make the rules invalid
 
Anonymous
I do. You're normally a positive contributor to chat. I don't want one small incident to upset you to the point that you don't come back.
 
6:05 AM
@PhiNotPi I'm confused :(
Oh, - is negation, not subtraction
Well.
 
@QPaysTaxes Kenny cracked my program: codegolf.stackexchange.com/a/77439/2867
 
How are people doing D?
 
Anonymous
Not :P
 
6:22 AM
Lower bound for complexity 1 is K
What about complexity 2
 
@Mego accidentally killed everything by doing list() on a 2**32 len iterable, and then forgot was running pypy so couldn't figure out why pkill -9 python3 wasn't working D:
in other news, my c-large runs in < 2 sec
 
@Maltysen wait why were you even doing that
 
by mistake
 
Anonymous
People do silly things sometimes
 
@Maltysen do you still skip factors over 1m?
 
6:26 AM
nah i took your suggestion
the main speed up however, was something really stupid
 
So you're up to D?
@Maltysen ?
 
I was doing cartesian product (0,1) len N
and then rrejcting any that started or ended with 0
now I do len N-2 and prepend and append a 1
 
what i did was keep the number an integer, and turning it into a base 2 string. (also, i start at 10000......000001 and increment by 2)
what did you import (and how long was your code?)
 
@MarsUltor from itertools import product
and 24 lines including blank lines
20 lines without
 
in chars?
 
6:32 AM
457
not golfy at all though
you?
 
i was semi-golfing it (using 1-char variable names because they're faster to type), 562 chars, no imports
no imports because i think imports are overkill for this
 
@Mego try C-large first before trying B again
 
Anonymous
The thing is, my solution for B should work
 
Anonymous
I have no idea why it doesn't
 
@Mego check your formatting?
 
6:37 AM
@Mego Do you think that cops can provide only a(1000) and a(1001)?
 
but
 
Anonymous
@KennyLau ?
 
Anonymous
@Maltysen It's not a formatting issue
 
B isn't even that hard
 
Anonymous
6:39 AM
I know, and that's what bothers me
 
did you get the small example cases?
@MarsUltor did you do B-large? can't figure it out
 
Hello
 
Anonymous
Yeah I got the small example cases easily
 
@Maltysen I did, using the same code as b-small
just not entirely sure my assumption is correct
if my assumption is correct, you can do it in <10 operations for each case
 
@MarsUltor that's crazy
 
Anonymous
6:43 AM
@Maltysen Could you humor me for a bit and tell me what you get for -+-+-+-+?
 
well, i mean 3 per char
 
@Mego 7
 
Me too
@Maltysen Is b-large too slow?
 
Anonymous
I'm gonna go put a hole in my wall with my face
 
Anonymous
I accidentally re-used a variable and it messed up the case numbering
 
6:45 AM
:P
 
@MarsUltor well i'm not making any assumptions like that and b-large will give me a graph with 2**100 nodes
@Mego livestream it
 
that's why I extracted it into a function
@Maltysen *up to
then ouch
 
Anonymous
@Maltysen No thanks you people don't need to see what I look like
 
@Mego ^^
 
6:47 AM
Tip:
There are n contiguous sections
Assuming n can only decrease by 1 per flip (I don't see how it can decrease by more)
Then you just need to count the number of sections
Add 1 if the last one is a -
 
@MarsUltor you are a genius
 
> Congration you Done it
Hilarious.
 
Anonymous
Oh crap B-large be eating mah memory
 
ihaichu fractiles
should I do that distributed stuff?
 
@Mego So, MLE?
(Memory limit exceeded)
Or did you successfully do it?
 
Anonymous
6:52 AM
I got a MemoryError yeah
 
Anonymous
Being smarter this time
 
Anonymous
I erred too much on the space side of the time-space tradeoff
 
Anonymous
Gonna run out of time :(
 
@Mego for B-large?
 
Anonymous
Oh well I still got 30
 
Anonymous
6:54 AM
Yep
 
Anonymous
35 actually
 
do C-large
do the thing MarsUltor and I did, and you won't even need to do anything smart
 
@Maltysen What are you doing now?
 
trying to do D, failing, thinking about doing that distributed thing
can't figure out where to enter though
 
@Maltysen ?
 
6:56 AM
that button takes me to the regular code jam page
 
@Maltysen Uhh, the registrations may be closed, as with the regular jam.
 
Anonymous
Donesies
 
@Mego \o/
 
Anonymous
Score 55
 
Anonymous
I didn't think about setting an arbitrary bound
 
6:57 AM
@Mego ?
 
Anonymous
But yeah that's smart and makes it go way faster
 
> arbitrary bound
 
Anonymous
Check prime factors up to sqrt(n) and N, where N is some large-ish number like 10k
 
I would use MarsUltor's idea for B-large, but feel too guilty
@MarsUltor did you get fractiles?
 
Anonymous
Get a machine with like 32 GB of RAM, use the ThinGraph mixin from the networkX docs, and get cracking :P
 
6:59 AM
@Maltysen You still need to make sure it works though
@Maltysen Nope
 
Anonymous
I'm not bothering with fractiles
 
Stuck on it
I'm doing it for the extra points
 
@Mego brb hacking into the pentagon
 
Anonymous
32 GB of RAM isn't even that much
 
Just in case I get too little for the small solutions or something
 
Anonymous
7:00 AM
Back at my university, we had a server specifically for CS
 
Anonymous
It had like 512 GB RAM or something like that
 
Anonymous
The server admin gave seniors accounts with no resource limits for funsies
 
@xsot wow you got fractiles
 
> since you need to do well in Google Code Jam round 1 to be qualified for Distributed Code Jam
 
unless that's another xsot in the scoreboard
@MarsUltor oh lel
 
7:02 AM
hi all
can anyone compile Ton Hospel's C++ code at codegolf.stackexchange.com/a/77212/9206 ?
 
@Lembik gcj?
 
@Maltysen ppcg.
 
I am on ubuntu and it doesn't compile for me and I would really like to try it out
@Maltysen ?
 
google code jam
 
please :)
 
7:03 AM
@Mego what's your username for Code Jam?
 
Anonymous
@MarsUltor TheOnlyMego
 
Anonymous
Some poser took "Mego" 4 years ago
 
@MarsUltor u?
 
I wonder if Code Jam submissions have to work for any input, or just for the test cases.
 
MarsUltor
 
7:04 AM
@Maltysen I actually got it wrong as I submitted it too hastily. I figured out the optimal answer after a bit more pondering
 
@Dennis It has to work for the input that they give you.
 
@Dennis IDK, but i hardcoded the filename in my submission
 
Anonymous
@Dennis AFAIK just the test cases. In later rounds they run your code with the input you succeeded on to verify that your code works.
 
Anonymous
@Agawa001 That's not very nice.
 
@Agawa001 ?! I am not sure I have ever even thought about CG!
 
7:05 AM
@Maltysen how are you taking the input?
 
@Agawa001 is this google code jam?
 
what is google jam ?
 
@MarsUltor for some taking filename from sysargs, others from < and >
 
Anonymous
Google Code Jam, a multi-round programming competition run by Google
 
@Lembik I think @Agawa001 means you have 0 answers in PPCG.SE
 
Anonymous
7:06 AM
I used to hardcode filenames, now I just use sys.argv[1] for simplicity
 
So hardcoding is allowed?
 
Anonymous
I also used to use C++, back in the dark days before I knew Python
 
@MarsUltor for coinjam I hardcoded N and J
 
Anonymous
Yep
 
@MarsUltor oh I see.
 
Anonymous
7:07 AM
Hardcoding the filename, that is
 
you can even do it by hand
 
Anonymous
I dunno if hardcoding N and J is allowed for C
 
@Maltysen You get a chance to do the distributed jam if you survive the regular jam up to round 3 or so.
 
f=open('C-large.in')
l=f.readlines()[1:][0].split(' ')
f.close()
 
Anonymous
If nobody from PPCG makes it to the finals I'm gonna be sad
 
7:08 AM
since I have it open anyway
^^ Not that hard to modify
 
@Mego oh plz dont accuse me trollin again
 
hi @TonHospel
 
@Mego I always use stdin/stdout and never open files directly.
 
@MarsUltor use with !
 
@TonHospel Your first code fix seems to have got rid of an error which is good
 
7:08 AM
31 secs ago, by Chris Jester-Young
@Mego I always use stdin/stdout and never open files directly.
no with needed. ;-)
 
Anonymous
I use something like with open(sys.argv[1]) as f: T, *data = f.read().splitlines()
 
@TonHospel I now get bpaste.net/show/042da8ee4d0a
@Mego what's the advantage of using with?
 
@Lembik auto closes and handles exceptions, etc.
 
Anonymous
@Lembik It automatically closes the file when it goes out of scope
 
Anonymous
:28883172 Syntax is with fn() as var
 
7:09 AM
Wait
you use the first line?
 
2 mins ago, by Chris Jester-Young
@Mego I always use stdin/stdout and never open files directly.
So, something like: ./A.py < A-large.in > A-large.out
 
@ChrisJester-Young Sweet! One of the problems just got trivial.
 
@Dennis :-D
 
thanks
 
@Dennis Which one?
 
7:11 AM
Not saying. :P
 
C?
 
in any case.. could anyone, please, attempt to compile that code :)
 
@Lembik ?
 
it is driving me mad
@Maltysen what is in the "handles exceptions, etc." part of your answer
@MarsUltor sorry..wrong person
 
@Lembik: Try to qualify conv with ntl: NTL::conv<...>(...)
 
7:13 AM
@Lembik i'm not sure. Its called contexts
 
@TonHospel ZZ sum = conv<ZZ>(0); becomes NTL::conv<ZZ>(0); ?
 
@Dennis It's probably C. In that case, it's still a lot easier to actually do it IMO
 
Is it too late to get involved with Code Jam?
 
@lembik: Yes
 
@Mego Poor thing. :'(
 
7:14 AM
@PhiNotPi No, ~18h remaining
 
@TonHospel what was the " ntl:" part of your comment?
test.cpp:100:26: error: expected primary-expression before ‘>’ token
ZZ sum = NTL::conv<ZZ>(0);
I clearly did that wrong somehow...
 
@Lembik: No, that notation should have worked. How about: ZZ sum; NTL::conv(sum, 0); (on two different lines so we know which line errors come from)
 
@Dennis How is making it work just for the test cases making it easier?
If it works for the test cases, how wouldn't it work for everything else?
Plus, you're gonna have to generate the output somehow anyway
 
@MarsUltor TBH, I've seen previous Code Jam problems, and they aren't really that interesting to me.
 
@MarsUltor Sorry, really not saying.
 
7:21 AM
@PhiNotPi Yeah, but many people aren't doing it because the problems are interesting
doesn't know how to start for D
 
test.cpp: In function ‘int main(int, const char**)’:
test.cpp:104:39: error: no matching function for call to ‘conv(NTL::ZZ&)’
@TonHospel ^^
 
Well, I'm going to bed now.
Bye!
 
@xsot how did you do D?
 
@MarsUltor Read the commentary at the bottom of the question. It explains the logic quite well.
 
But
 
7:26 AM
@ChrisJester-Young yeah but K goes up to 100
 
it doesn't explain how to do it without listing ecerything
K^C goes up to 10^18
 
@TonHospel I am looking at the conv part of shoup.net/ntl/doc/tour-ex1.html and also stackoverflow.com/a/27377278/2179021
are either of those helpful?
I don't really know how to code in C++
 
I do. :shrug:
 
@MarsUltor There's a very short linear time solution. I don't want to spoil it for you, but consider drawing out the tiles and carefully observe how the gold tiles propagate in each stage
 
@ChrisJester-Young great! :)
 
7:30 AM
@lembik: They mainly say all versions should work :-) However try the implicit one: ZZ sum; sum = 0;
 
test.cpp:103:39: error: no matching function for call to ‘conv(NTL::ZZ&)’
double rho = sqrt(conv<double>(sum))/factor;
:)
I think that means success for the implicit one
@TonHospel I saw this in the changelog "Made the conversion interface more complete and uniform. Also, using template notation, one can and should now write conv<ZZ>(a) instead of to_ZZ(a) (for backward compatibility, all the old names to_XXX are still there, but many new conversions are not available under these old names). "
 
.oO(I wonder what the advantage to using NTL is compared to Boost.Multiprecision, because I have experience with the latter.)
 
@lembik Yes. So maybe for this one we can try implicit too for the rho: double rho = sum; rho = sqrt(rho) / factor;
@lembik: Otherwise double rho = sqrt(to_double(sum)) /factor;
 
test.cpp:103:18: error: cannot convert ‘NTL::ZZ’ to ‘double’ in initialization
double rho = sum;
 
@lembik: split it up again ? double rho; rho = sum;
 
7:36 AM
test.cpp: In function ‘int main(int, const char**)’:
test.cpp:104:9: error: cannot convert ‘NTL::ZZ’ to ‘double’ in assignment
rho = sum;
^
how about using to_ZZ ?
 
@lembik: This is getting silly. Can you paste the file /usr/include/NTL/ZZ.h somewhere so I can see what is available
 
@zyabin101 :) NSA?
@zyabin101 is that 100% polite by the way?
 
@Lembik Sorry, now deleted.
 
np
 
@lembik: double rho = sqrt(to_double(sum))/factor;
 
7:43 AM
no errors!!
 
@Lembik \o/
 
@TonHospel great new output messages :) Out of interest, does your code rely on the min eigenvalue being at least 1?
 
@Lembik: No
 
@TonHospel what happens if you try the example from the paper with high eccentricity?
 
@lembik: Should work for any positive definite matrix
@lembik: Works fine but no Siegel reduction yet
@lembik: So needs 109 points
 
7:46 AM
@TonHospel did I tell you I tried github.com/abelfunctions/abelfunctions which I think just implements that paper and it is amazingly slow
 
@lembik: They must have made an error :-)
 
@MarsUltor @Mego and other code jam players: what's your username on the code jam?
 
@TonHospel and the mathematica version is also very slow according to Martin B
 
TheOnlyMego, Maltysen, xsot, MarsUltor, DennisMitchell
 
7:50 AM
hi @MartinBüttner
 
@lembik: I also optimized the ellipsoid walker quite a bit over what they suggest (directly combined with the calculation avoiding all matrix multiplication)
 
@TonHospel it would be awesome if you could write this up in any case.. even in ascii in your answer
 
@lembik: Anyways, the runtime grows very much with requested precision and dimension, so I hope these people didn't ask for insanely precise results
 
@MarsUltor How can I find someone on the very large leaderboard?
There isn't any search tool, is it?
 
@zyabin101 top right corner
You can als add to friends
 
7:53 AM
@MarsUltor The last one is totally not me. >_>
 
@MarsUltor Uhh, I'm not logged in.
 
@TonHospel that could well be it.. I will test all these things :) How confident are you that your method gives the right answer now? Are there provable bounds?
 
nods
 
@MarsUltor OTOH, my username on Google Code Jam is easy to figure out. ;-)
 
totally removes DennisMitchell from friends list
 
7:55 AM
@TonHospel timing your lovely code now
 
@lembik: Yes, it uses the bound from the paper. In fact it's too pessimistice and typically returns way more precission
 
hahaha
 
@xsot you're in the lead of our pack! (Or are you?)
 
@ChrisJester-Young Not for me
 
7:56 AM
@lembik: Especially in higher dimensions this makes the program unnecessarily slow. I might replcace it by an adaptive expansion of the ellipsoid instead (but losing the guaranteed error bound)
 
@MarsUltor cky.
 
@TonHospel This is too awesome for words!
 
it's not that easy though :(
 
@zyabin101 err my actual score is 45 unfortunately
 
Malyisen's is easier
 
7:57 AM
@TonHospel m = 10 , n = 20 takes only 30 seconds for 5 runs!
 
@xsot Then which username is the correct one?
 
I need to change the challenge now as you have broken it :)
 
I mean, that's me on the leaderboard, but the displayed score assumes that all large outputs are right
 
@lembik: And if the error bound was better it would in fact take less than 1 second
 
@zyabin101 Yep. /cc @MarsUltor
 
7:58 AM
@TonHospel great!!
@TonHospel I am surprised you only quoted n= 19 or 20 though.. my computer is normally slower than everyone elses
 
@ChrisJester-Young D: you've only done A
 
@lembik: In this version you can give the error bound as an optional commandline argument
 
@MarsUltor That's because I'm going to sleep on the rest of the problems.
 
But
 
@lembik: I typically work on an ancient core2 duo laptop
 
7:59 AM
@TonHospel oh.. I didn't realise
 
B and C shouldn't be that hard
 

« first day (1897 days earlier)      last day (2937 days later) »