« first day (1602 days earlier)      last day (3399 days later) » 

1:18 AM
Hey, I'm designing a group of objects that have no specific order, but have tags. Is there an algorithm to efficiently filter out items with/without certain tags
 
user41796
@NathanMerrill You need to provide more detail for that to be answerable.
 
like what?
iteration through each object will be O(N*M), where N is the number of objects, and M is the number of tags
 
user41796
@NathanMerrill Well, you can simplify that by just walking each object for a particular tag
 
user41796
and you might consider indexing the objects. But at that point, you're getting dangerously close into RDBMS territory. :-)
 
psr
2:28 AM
@NathanMerrill Indexes. If you roll your own you would be looking at which tags have the highest selectivity, singly or maybe in sets, and trying to use those - possibly use bitmapped indices if the number of tags is small enough and your searches are often boolean combinations of tags.
 
 
11 hours later…
1:17 PM
People who don't use types reasonably piss me off.
I should never have to do anything like *((X*) var).
 
 
2 hours later…
2:57 PM
Turns out an unexpected drawback of Google Now - when you get flight confirmations for flights you didn't book but someone put the wrong email address for.... and GNow adds it everywhere. lol
 
user41796
3:44 PM
@enderland - as a mod, are you allowed to edit the room owners of any chat room?
 
I think struct padding is screwing me.
 
user41796
@ThomasOwens Can certainly happen, yes
 
The sizeof the struct is 2 bytes bigger than the sum of the components. I have an array of these structs. After I read element 0, the values start going bogus in element 1.
But in the file, the location of the data isn't padded.
 
user41796
@ThomasOwens Why are you doing pointer arithmetic to get to the next element in the array? You should be able to have a pointer for the current struct and then index through the array like a regular array.
 
user41796
Or did I misread what's going on?
 
3:54 PM
@GlenH7 I am.
I'm not doing pointer arithmetic.
 
user41796
I bet one of your variables in the struct is a short and you're dealing with byte padding.
 
Yeah.
 
@GlenH7 I'd assume so
 
user41796
You should be able to turn off byte padding and recompile.
 
Double, a handful of uint16_ts, a float, a uint32_t, and a whole bunch of floats.
 
3:56 PM
I can edit the room tags/etc
 
Yeah. I'm thinking about doing that. But I don't know what I would break if I did...
 
user41796
@enderland Would either your or Thomas like to experiment with the new Engineering chat room and make me a room owner there?
 
user41796
stupid typos. Can't type for crud today.
 
user41796
@ThomasOwens Just run the regression test suite to validate it.
 
I haven't really participated yet, so I don't feel comfortable.
@GlenH7 Yeah. I'm just afraid of the results.
 
user41796
3:57 PM
Don't kick me for poking fun... :-(
 
user41796
@ThomasOwens The chat history will take you all of 5 minutes to skim... :-)
 
user41796
I dunno how I feel about hanging out in two rooms at once though... :-)
 
There.
 
user41796
Cool, thanks. It feels awkward being in a chat room and not being able to fix things... :-)
 
user41796
@ThomasOwens Another option to consider is compiling just the module that handles those structs without byte padding. And then link that module to the others. That would minimize some of the risk from the change.
 
user41796
4:05 PM
But you would need to provide an intermediate struct / class that could be sent to the other modules. That intermediate structure wouldn't have the short so it would remain the same size regardless of the byte offset padding option.
 
aww my first workplace answer in over a month only has 2 upvotes...
 
user41796
@enderland You should suspend all the users who didn't up vote your answer then....
 
hmmmm
I would like to remain a mod :P
 
user41796
Pffff
 
@enderland The question only has 118 views.
 
user41796
4:12 PM
@durron597 Exactly, so he should easily have 100+ up votes already.
 
@enderland Why didn't you upvote the question?
I'm at a point (on SO anyways) that if I'm going to bother to answer the question, then that means the question is worthy of an upvote
By the way, I know the question is super super old, but this answer is awesome:
3
A: How do I solve the world's hardest sudoku?

wolfmanxGuessing single values in a depth-first search is sub-optimal. So, here is a reasoning chain based on a breadth-first hypothesis/disproof method (which my stepson reluctantly calls "educated guessing"). Just following the chain including contradictions requires to solve 23 variants of the sudo...

 
user41796
@durron597 He's on a race to challenge gnat for downvote percentages... :-)
 
Especially read the link he made to the full webpage on the subject
 
user41796
@durron597 I'm about to tackle some optimization stuff, so that looks to be an interesting read.
 
@durron597 I had, some folks downvoted it (I edited it pretty significantly)
 
4:25 PM
ah
 
 
2 hours later…
6:39 PM
can I put a hyperlink in a tag wiki summary, and if so how? (it doesn't show up in my suggested edit.)
 
user41796
@dcorking In the excerpt, no. In the regular body, yes
 
aha thanks @GlenH7 - I'll go fix my suggested edit before someone reviews it.
 
user41796
yw
 
psr
8:01 PM
@durron597 If you count the website then that's a pretty epic answer.
 
 
1 hour later…
9:22 PM
@psr If I had more rep on that site I'd give him an awesome answer bounty
Did you upvote it?
 
9:39 PM
@durron597 Maybe it's because I'm tired but man I'm having a hard time following that explanation...
 
9:54 PM
@enderland The sudoku?
It is a little convoluted, the website is better
 
What's the difference between "Leave Open" and "Skip" in the Review Close Votes queue?
 
psr
10:32 PM
@durron597 I would have had to join to do so.
 
11:25 PM
@MetaFight Skip does nothing; Leave open is the review equivalent of a reopen vote.
Well, maybe not nothing... It probably logs the fact that you reviewed it.
 
makes sense.
I didn't think you could vote to reopen before the question was closed. Does it just count as a negative close vote?
 
@MetaFight Hmm, well I guess if you pile up enough people reviewing, it completes the review. See this one: programmers.stackexchange.com/review/close/91011 (though to be fair, it hasn't closed yet). My "leave open" vote only succeeded in completing the review; it didn't change the number of pending close votes.
59
Q: What are the review queues, and how do they work?

ManishearthI see a "review" link on the top of the page, which takes me to a few "review queues". What is a "review queue"? What are the various queues for? What can I do in each queue? Return to FAQ index

> If enough people vote to leave a question open or closed, the question is removed from the close/reopen queue (respectively) and immediately begins aging the existing close or reopen votes on the question (it does not clear them).
 
11:50 PM
cool. Thanks for the info and link to the meta article.
 

« first day (1602 days earlier)      last day (3399 days later) »