313 reputation
111
bio website
location
age
visits member for 2 years, 10 months
seen 5 mins ago

2h
comment Entity Component System Coupling
@Telastyn good point about the second case, the system could just check if two "position" components have the same identity. For the first case, the ability to change components on the fly is one of the things about this pattern that appeals to me. Maybe I'm abusing the pattern by doing this, but I assumed the OP here was doing the same: "Systems are responsible for the actually modifying the entities by changing their components." But maybe this means changing the properties of components, not changing which components an entity is composed of. I might write up a question about that later.
15h
comment Entity Component System Coupling
@Telastyn I've run into two cases where systems need access to the entity being processed and not just its components. A system might need to add a component to an entity, or remove one. It might also need to check if an entity is the same as the one being processed; for example imagine a system where you need to find the nearest entity to the entity being processed (that could probably be handled with some kind of "identity" component, but using the identity of the entity itself seems more straightforward).
1d
comment How can I fetch data from more than one web services simultaneously in PHP?
This is actually a common problem when working on property rental portals in my experience. Property managers use a variety of data providers to get their property info into various portals. A good portal will want to pull from a number of providers and aggregate all of this into a local database. The information also changes fairly often, since rates are seasonal and availability calendars change all the time. We used to handle this by pulling updates from each provider once a night, and pulling a last-minute update for an individual property when a customer was ready to book.
2d
comment Find 'Connected Components' in undirected, unweighted graph coded as a 2d array
You could make a copy of the graph, then iterate through each node, doing a flood fill from that node. As you do the flood fill, change the value of each connected node to 0. At the end of the flood fill, increment a counter. When your iterator moves to the next node, skip it if it has a value of 0. At the end, each node should be 0 and your counter should contain the number of connected components.
Nov
23
answered What are the advantages of using async JavaScript modules (like AMD) for traditional sites?
Nov
22
awarded  Revival
Nov
22
comment Find common ancestor
Assuming it's a dynamic tree, the most straightforward way is probably to walk from each leaf up to the root of the tree, unshifting each node onto the front of an array, then check the arrays for the index that doesn't contain the same node in each array. The node at the index before that is the lowest common ancestor.
Nov
21
revised Are promises suitable for Model Controller communication?
added 47 characters in body
Nov
21
answered Are promises suitable for Model Controller communication?
Nov
19
comment how can I minimize my ajax calls to the server while creating a dashboard
Last sentence brings up an interesting point. If domain sharding isn't used, the XHRs and the other resources may block each other. OP might want to put domain sharding in place if it isn't yet and see if the problem goes away.
Oct
5
comment Design pattern name for an API wrapper class
Why not name the class GithubClient?
Sep
28
comment What are the current (2014) naming conventions in C for file names?
it looks like it's old, being based on old-timey Unix machines -- was there ever a time where UNIX filenames had anything close to an 8 character limit? Did you mean old DOS/Windows machines?
Sep
13
awarded  Informed
Sep
13
awarded  Critic
Sep
9
awarded  Editor
Sep
9
revised Does distributing GPLd assets with a non-GPL application violate the license?
added 610 characters in body
Sep
9
comment Does distributing GPLd assets with a non-GPL application violate the license?
Anyway, I don't know why we would assume it's a combined work. The FAQ entry reinforces the idea that if a distribution is clearly presented as containing multiple separate works, and can be reasonably construed to contain multiple separate works, then it contains multiple separate works. This FAQ entry is also relevant. Does a program that uses an icon set really sound like a modified version of the icon set? Of course not.
Sep
9
comment Does distributing GPLd assets with a non-GPL application violate the license?
@DmitryAlexandrov Except that most of section 5 only applies to conveying modified source versions, which is not what I'm doing. I'm not conveying a modified version of the Faenza source or "object code," I'm conveying a verbatim copy as described in section 4. The way I read it, the last paragraph of section 5 is only trying to clarify that packaging two or more separate works on the same medium (which is what I am doing) does not subject one work to the GPL license of another. This FAQ entry expands on the idea.
Sep
9
comment Does distributing GPLd assets with a non-GPL application violate the license?
@DmitryAlexandrov you're right, and the fact that it mentions "a fashion requiring copyright permission" suggests that they are talking about concepts like what the USCO calls "derivative works." It also says "other than making an exact copy," which is what I would be doing; I have no intention of modifying the icon set, I'm just going to package an exact copy. So by their own definition (and by any sensible definition) my work would not be based on the icon set (or be a modified version of the icon set, or a derivative work, or whatever).
Sep
8
comment Does distributing GPLd assets with a non-GPL application violate the license?
@DmitryAlexandrov section 5 says you "may convey a work based on the Program..." without going into any more detail about what it means for a work to be "based on the Program." As far as I can tell, trying to determine whether a work is based on another work is the same as trying determine if it is a "derivative work," so if a jurisdiction has a concept of "derivative work" it's probably applicable here.