« first day (2139 days earlier)      last day (2810 days later) » 

9:05 PM
@thepiercingarrow it gives guaranteed O(1) access [instead of just expected O(1)] but in exchange may easily use quite a bit of extra memory.
 
@JerryCoffin But should also be more cache-friendly, right?
 
@sehe I think you're overstating the situation a bit. There are a lot of formats for which alternatives and conditional parsing simply aren't necessary--the only choices are 1) the file contains what we expect here, or 2) the input is corrupt and we need to report an error. No, I'm not saying "sscanf is the greatest", but I do think "antiquated" is overstating its weakness a bit.
@caps Hmm....maybe. You'd be accessing more or less linearly, which is good, but accesses wouldn't be very close together. It might gain a little, but probably not a whole lot.
 
@JerryCoffin Doesn't std::unordered_set require more allocations than a std::bitset would for this use case?
 
Uh. How not
Node based containers pretty much by definition require more allocations.
@JerryCoffin Oh well. It's tastes too. I think I tried to make sure that my bias was very explicit.
@TemplateRex team? Never heard of that name. Qi is going to stay around for some while and for now it has some features that X3 doesn't. Like, e.g. stability and support :)
 
I'm unfamiliar with Karma, is it boost::json?
 
9:16 PM
@caps Yeah, it's allocating a lot of separate nodes rather than a single big chunk of memory, which might be a win. I suspect a lot would depend on usage pattern though--if it were sitting around much, I can easily imagine large chunks of the bitset getting paged out to disk, in which case its contiguous address space doesn't really mean much.
 
@CaptainGiraffe it's the yang to the yin of Qi
 
@TemplateRex I thoroughly appreciate you Top Dogs giving me google friendly keywords.
 
How does this help??
 
whoops
I appear to have sat down to play Mankind Divided for half an hour, and it suddenly seems to be about five hours later
 
9:22 PM
@CaptainGiraffe You didn't use enough question marks. Request denied.
 
@JerryCoffin How does a bitset use more memory than a hashtable?
 
@sehe I was reluctant about the second one...
 
There is still hope then :)
 
I'm an old dog. I still manage sit though.
 
9:26 PM
@thepiercingarrow You allocate a lot of bits to represent all the number from 0 to N. Many stretches of those bits are just "wasted space" as they will all be off.
 
@TemplateRex And thanks, I was just being facetious.
 
@thepiercingarrow It has one bit for each number in the range of input numbers. If the number of inputs is small compared to the range, you end up storing a lot of 0 bits. In that case, a hash table may use a lot less space (e.g., if I have two numbers between 0 and 10^21, a hash table will store two numbers, but a bitset needs ~10^21 bits).
@Puppy Hmm...I once had a bit the same experience (when the original SimCity first came out).
I'll play just a little more, then I need to have supper....what it's 3 AM?
Fortunately I was younger and better able to survive with little or no sleep back then.
 
@JerryCoffin I had that experience with the MAC-65 Assembler =)
I recall my Mom asking me "Are you already awake?". "Oops".
 
@CaptainGiraffe That doesn't count. If we include programming, I had a lot of "oh gosh, the sun's coming up, I'd better at least take a quick nap before work" kinds of days.
 
@JerryCoffin I was 12 I think at the time. Work was at least 9 years away.
 
9:36 PM
@CaptainGiraffe I never had a problem like that when I was 12--I couldn't even afford a programmable calculator until years later, not to mention an actual computer.
 
I learned a lot of english from the MAC-65 manual as well as the fabulous DE-RE Atari =) Jerry you are about 13 years older than me.
 
@CaptainGiraffe Somehow it feels like longer than that since I was your age...
Seriously, I think I've aged quite a bit faster since I got married.
 
@JerryCoffin Was it that or having kids?
 
hmm
thinking about changing my grocery supplier
my existing one doesn't seem to understand that storing passwords in a recoverable form is fucking dumb.
 
@caps I think having kids is all that's kept me from turning to dust.
@Puppy s/in a recoverable form //
 
nwp
9:48 PM
storing them together with hash-brownies in a salt shaker is fine, or so I've heard
 
@nwp It can be fine. If you get the sea salt, that can be pretty coarse though.
 
you put hash browns in a salt shaker?
 
nwp
maybe you were supposed to eat them, which would also explain why I get this kind of advice
 
hash-brownies. Is that a data structure reference, or a complicated marijuana reference?
 
@CaptainGiraffe Hashish must not be all that complicated--they've been making it for hundreds of years.
 
10:12 PM
:32475560 ...and insertion sort is complicated?
Oh, oops. Now it decides to update and tell me you deleted that...10 minutes ago. Maybe it's my fault though--I do have the machine just a bit busy at the moment.
 
10:45 PM
@Mysticial Haha, that's just gold. Also OPs explanation sounded like a load of crap.
 
I'm sad that functions like ceilf don't return an integer type
 
@Borgleader He works in a situation where security is so tight he's not allowed to know what he's doing.
14
 
that is a star yes
 
What is wrong with this DP matrix sum. It keeps giving the wrong answer:

int solve(int i, int j) {
if (i < 0 || j < 0) return 0;
if (i == 0) return mat[0][j-1] + solve(0, j-1);
if (j == 0) return mat[i-1][0] + solve(i-1, 0);
return mat[i-1][j-1] + solve(i-1, j) + solve(i, j-1);
}
 
nwp
Aug 19 at 11:58, by nwp
Got a C++ question? Go to the C++ room!
 
10:59 PM
seriously doe
 
@JerryCoffin lol! have a star
@AndreasPapadopoulos I'm a Properly Built Shit System
@templateboy Whats wrong is you question dumped it here
 
nwp
seems like the message is not working as intended, there seems to be the same amount of questions dumps as always
 
11:22 PM
@templateboy First thing I notice that if i==0, j==0, it is going to access mat[0][-1]
 
11:46 PM
@Nican ...and that's pretty much not an if, but a when (recursion passing i-1 and j-1).
 

« first day (2139 days earlier)      last day (2810 days later) »