Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Activity for Derek Elkins‭

Type On... Excerpt Status Date
Comment Post #291132 I think it's quite safe to neglect. Virtually no project is going to have a significant fraction of its contributions coming from non-users who are only motivated by a desire to contribute to FOSS. Such people will have plenty of FOSS projects that they use that they could contribute to and/or are mo...
(more)
about 2 months ago
Comment Post #291132 There are multiple unstated premises in this question. Presumably these people are at least users of the software. Also, they'd need to have something they want changed. Further, those changes would need to be changes they want to contribute. For example, changes that tailor the software to my enviro...
(more)
about 2 months ago
Comment Post #289948 The structure of this question is kind of awkward. For example, let's say these *were* all the options. Are you expecting an answer that's just, "Yes, those are all the options"? What I think your actual question is is "what is a *good* software architecture for your problem". That said, you haven...
(more)
7 months ago
Comment Post #289443 Feel free to remove the parts those first paragraphs address, and I will remove those paragraphs. As for "bias", why would you expect a tool purpose-built to do a specific task to not be better at that task than tools not purpose-built for that task? The "problem" with `pipx` is that it is not abl...
(more)
9 months ago
Comment Post #289327 Do you have an example of "re-entrant" being used this way, e.g. a link to a place where it is used this way? I have never heard "re-entrant" to mean "has no side-effects" and would never use it that way myself as it would be unclear and confusing. While far from perfect, the [Wikipedia page](https:/...
(more)
9 months ago
Comment Post #289327 Reentrancy definitely does not mean a function has no side-effects, let alone that it is thread-safe *because* it has no side-effects. Indeed, the archetypal example of a procedure you'd want to be reentrant is an interrupt service routine triggered by an external device which *must* perform side-eff...
(more)
9 months ago
Comment Post #289251 I think there are better and worse ways of creating question to be self-answered. The best way is to have a question that you were going to ask but answered before you asked. Next best is to closely model the question off of a real question. Here, you play a character who comes off as having no un...
(more)
9 months ago
Comment Post #289263 The distinction you mention is 1) not the main (or arguably even *a*) distinction between statements and expressions, 2) it's certainly not widely used, and 3) as you mention yourself there are plenty of exceptions. Most programming languages specify the evaluation order of subexpressions, some, s...
(more)
9 months ago
Comment Post #289229 I'll add this here since it is somewhat in the vein. I've downvoted because, while your answer does touch on the main idea separating statements and expressions, it presents it as a comprehensive definition and not the rough intuitive bucket that it is. As Moshi's answer correctly states, what is an ...
(more)
9 months ago
Comment Post #288787 +1 Simpler answer than mine.
(more)
10 months ago
Comment Post #288771 If I'm understanding your code correctly. You are equating car IDs with user IDs. Instead you should be relating (car ID, user ID) *pairs* with other (car ID, userID) pairs. Loosely (the following isn't to be taken literally), you should have things like `remsp(p, (current_car_id, current_user_id), (...
(more)
10 months ago
Comment Post #288771 I don't quite understand your comment, specifically "{1,2,3} have to be in one set, and {a,b} as well". The equivalence relation is on the pairs, not the IDs, and it does equate (1,a) and (3,b) in this case. Note that the equivalence relation is the one *generated* by the relation I specified, which ...
(more)
10 months ago
Comment Post #287632 And yet here we are with someone caught off guard by them. Most languages don't do what Python does and JavaScript, which has/had vaguely similar scoping to Python's, has moved away from this and toward block scoping. If declarations change the behavior of the code, then they are not useless. The ...
(more)
over 1 year ago
Comment Post #286975 @Lundin "For the most part" is not the same as "always". There can be (and likely are) implementations where this is not the case, such as [the executable specification in the K Framework](https://github.com/kframework/c-semantics) explicitly designed to catch undefined behavior. As in your answer, t...
(more)
over 1 year ago
Comment Post #286975 While it's not uncommon to simply (stack) allocate space for local variables, so that their value is based on whatever was in that space on the stack, this is not specified by the standard. Talking about implementation details like this is often misleading for C (and C++). The standard allows a much ...
(more)
over 1 year ago
Comment Post #286940 Don't you see? The screenshot clearly shows one vector ending before the other. Ignore the fact that the components of the vector take up different amounts of textual space...
(more)
over 1 year ago
Comment Post #286511 While there are some aspects that seem like a bad idea generically, e.g. having `State` depend on `StateMachine`, it's hard to judge what advice to give without knowing what you're trying to accomplish. For example, a state machine used in the implementation of a regex engine has very different requi...
(more)
almost 2 years ago
Comment Post #286411 I suspect this isn't really an answer to your question, but implicit methods can usually give some strong guarantees about being closed surfaces. For example, signed distance fields inherently can't have "gaps". They can have "singularities" but I don't think that's much of an issue in practice. Thes...
(more)
almost 2 years ago
Comment Post #286400 What you're describing is simply a violation of the LSP (Liskov Substitution Principle) and has nothing to do with `const`ness. The scenarios you describe (both specific and generic) are ones where there is no possible `const` implementation that doesn't violate the LSP. The problem is C++ provides n...
(more)
about 2 years ago
Comment Post #285974 Separately, I didn't complain about C's type system. If anything, the allowance of non-`void` `_Noreturn` functions is nicely in line with theory. At worst, I implied that `void` could be better named. I certainly could complain about aspects of C's type system and design in general. I don't really...
(more)
about 2 years ago
Comment Post #285974 C is not "very close to actual machine code". (This is obviously true because C is used on a huge variety of machines, but even for mainstream CPUs it's become ever more divergent from what's actually happening.) The notion of a "stack" is not a concept in C, which is good since C is deployed on CPUs...
(more)
about 2 years ago
Comment Post #285974 I don't see what your getting at. The fact that there are cases where you want a `void` returning `_Noreturn` function doesn't mean there aren't cases where you want a non-`void` returning `_Noreturn` function. Where non-`void` returning `_Noreturn` functions would most obviously be useful is for fun...
(more)
about 2 years ago
Comment Post #285974 From a (type) theoretical perspective, not only is it sensible but it's quite natural to have non-returning functions of any type. Type theoretically, a type with no values is usually called `Void` (not to be confused with C's `void` which, type theoretically, is usually called "unit" and has exactly...
(more)
about 2 years ago
Comment Post #285823 I probably won't make this into an answer, but if security is a high priority, I'd recommend using an internal representation that is simply incapable of representing malicious code. That is, rather than using a rich but complicated representation, like HTML, use a much narrower representation that s...
(more)
about 2 years ago
Comment Post #285843 In my experience, avoiding implicit transactions a la `TransactionScope`, is generally a good idea. It's very easy to include things that you do not intend into a transaction using `TransactionScope`, e.g. logging messages. Newer versions of EntityFramework do a better job with giving the developer c...
(more)
about 2 years ago
Comment Post #285394 If you add a line to print out the string you are passing to `JsonParser.parseString`, I believe the problem will become clear. That said, at a higher level it seems round-about to produce a string of JSON only to parse it back into an object again. There's surely a way to build a `JsonElement` direc...
(more)
over 2 years ago
Comment Post #285389 Do the files in Project A get updated in place or are they immutable once they are uploaded/created either because there isn't an API to make changes to the files or because any "updates" just make new files?
(more)
over 2 years ago
Comment Post #285179 Yep. The server affinity stuff (aka as stickiness in the literature) is exactly the kind of thing I was thinking of with "depending on how the server is configured". The scenario you describe makes it sound like latency isn't that big a deal (within reason) and that these complex computations are ...
(more)
over 2 years ago
Comment Post #284563 There's some benefit to recognizing something is a monad in C#. In particular, it can (and should) support (a subset of) Linq syntax. This can allow you to write stuff like: ```csharp var result = from x in f(a, b) from y in g(c, x) from z in h(x, y) select...
(more)
over 2 years ago
Comment Post #283805 For this particular example, we could specialize `env` to an `int`, i.e. the row index. One thing you don't mention or illustrate but is fairly important is that this function will need to allocate memory. This also makes it not very idiomatic C. So taking `output` pointer as an input would arguably ...
(more)
over 2 years ago
Comment Post #283805 Other than illustrating function pointers, this answer doesn't seem particularly helpful and doesn't really illustrate good or effective practices while also leaving implicit some pretty crucial information. Starting with your approach, there are two major issues: 1) it seems to assume (without expli...
(more)
over 2 years ago
Comment Post #283805 I'm not sure what you're referring to as being O(n^2), but the filter itself is O(n). The filter and map, i.e. the submatrix extraction as a whole, is O(n^2) but could trivially be made O(n) with a constant time slice method. If you were referring to the algorithm as a whole, then efficient implement...
(more)
over 2 years ago
Comment Post #282691 Yep, that works. Thanks.
(more)
almost 3 years ago
Comment Post #282691 Can you include a reference to qmake in the title and/or body of the question and not just have the tag do this work? Without looking at the tag, the question seems too broad to be answerable, and it's only when one notices the tag that the scope becomes clear.
(more)
almost 3 years ago
Comment Post #281192 The issues that might prompt rollback aren't just "the migration failed to complete successfully". Commonly, after deploying (especially database migrations), it's common to do at least some kind of smoke testing to make sure the production environment is behaving as expected. If these tests fail, ro...
(more)
about 3 years ago
Comment Post #279716 @ArtOfCode Typically, in a scenario like this, you'd want to fallback to a local copy of the JavaScript library (potentially trying some other CDNs beforehand). Also, while we're talking about it, I'd recommend using [Subresource Integrity attributes](https://www.srihash.org/).
(more)
over 3 years ago
Comment Post #278563 The linked page provides several implementations of `pmat`.
(more)
over 3 years ago
Comment Post #277488 The K Framework project, a system for specifying operational semantics for programming languages, made a semantics for C that would get stuck when undefined behavior was encountered. The implementation is here: https://github.com/kframework/c-semantics and it's described in the paper [Defining the Un...
(more)
over 3 years ago
Comment Post #278173 What evidence do you have to support that the reason for this (lack of) specification is "to allow compilers to keep their expression parsing algorithm a trade secret"? There's no reason how you parse expressions would affect execution time of the ultimate program, and I doubt how parsing is implemen...
(more)
over 3 years ago
Comment Post #278049 @ShowMeBillyJo In the scenario I believe the OP is in and the scenarios I've described, you are not starting with HTML but rather generating it client-side, e.g. from Markdown. In this case, no one needs to parse HTML. To me, it's better to offload user-specific non-security-sensitive work to the cli...
(more)
over 3 years ago
Comment Post #278032 You should clarify that *for programming languages that will treat strings as boolean values and which interpret the empty string as false and **all** non-empty strings as true*, then it will be the case that the boolean value associated to the concatenation will be the disjunction of the boolean val...
(more)
over 3 years ago
Comment Post #278044 It's probably worth noting that these don't provide equivalent interfaces. In particular, the CancellationToken approach does not provide you with a way of telling when the cancellation is "complete". The second interface would be closer to the former if `StopAsync` returned `void` (at which point `S...
(more)
over 3 years ago
Comment Post #278044 "Best" in what way?
(more)
over 3 years ago