Reputation
2,867
Top tag
Next privilege 3,000 Rep.
Cast close & reopen votes
Badges
11 16
Newest
 Enlightened
Impact
~128k people reached

20h
comment Is there any practical trick to remember the difference between big-endian and little-endian?
@JoonasPulakka Big-endian and Little-endian really started out as machine-oriented specifics, rather than as "Pure Theoretical CS notions", so I guess I could argue this both ways. Unless we're looking at bit-level transmissions, I guess the endian-ness of octets very rarely matter on most modern machines.
Aug
8
comment How should I structure these Python classes?
There's nothing stopping you from writing an "abstract service base class" that does this through-wiring for you, but whatever lets you express what you want, with the minimum maintenance hassle 2-3 years down the line.
Jul
22
comment Why is String immutable in Java?
Technically, Common Lisp has mutable strings, for "string-like" operations and symbols with immutable names for immutable identifiers.
Jun
9
comment To which extent can one take ideas from programs under GPL in developing a commercial app?
@Trilarion The way you do it if you're "sufficiently paranoid" and "have enough resources" is having one team studying the source code and provide API documentation to another team that don't look at the source and write your code.
May
1
comment Why is negative zero important?
If the particular example is "1 / 0.0" / "1 / -0.0", 0 is a branch cut for 1/x and the limit depends on if you approach it from below or above.
Nov
11
comment Reference counting & GC in LISP
It only can with weak references, which is a higher cognitive load on the programmer.
Nov
11
comment Reference counting & GC in LISP
But that means you need to have two types of references, where a single type of reference would have sufficed, with a more advanced (and not necessarily any slower) GC. Remember that updating a reference count MUSt be lock-protected, so any "reference or de-reference any other object" is suddenly a lock acquisition, instead of amortised at GC time.
Nov
4
comment Undefined behavior, in principle
Or even "may produce different results in consecutive runs of the same binary, resulting from a single compilation".
Oct
21
comment Robustness and pointer safety in C++
I agree that code is vastly more likely, but even in the face of perfect code...
Oct
21
comment Robustness and pointer safety in C++
Well, at large enough scale, you will have bits flipping unintentionally in RAM.
Aug
1
comment What would the register-machine bytecode for this code look like?
@GregHewgill Or for proper abominations, MOV EAX, 5 followed by LEA EAX, [EAX*2 + 1]
Jul
29
comment When is a number a magic number?
@DaniellDinnyes Exactly. It would have been much easier to read if I'd used "HoursPerWeek" instead of 168 (which is the right number, but not a constant most people recognize on sight).
Jul
29
comment When is a number a magic number?
Not to mention return 168 * weeks...
Jul
9
comment How meaningful is the Big-O time complexity of an algorithm?
Well, neither quicksort nor heapsort come with stability guarantees, so that (specific) issue shouldn't be a deciding factor between them.
Jun
10
comment What are the differences between a while loop and a for loop?
@JörgWMittag Well, that depends on the for loop, now, doesn't it. Although one could argue that a C for loop is actually a while loop in fancy clothing.
Feb
7
comment What is stopping people from copy-pasting open-sourced codes into their own projects and releasing only the compiled binaries?
@jwenting Yes, the presence of "machine code identical to what source G would have produced" is an indication (a fairly strong, but still only indicative) of having used copied source. But that is probably enough to start civil proceedings, with associated discovery.
Jan
7
comment Advertisements & GPL
It's not about "commercially", it's about "distributing", at all. At least if I recall the GPL, in pretty much any version, correctly.
Jan
2
comment What is the history of why bytes are eight bits?
@khrf It's possible, I just can't recall any architecture that had it (I mostly considered general-purpose computers).
Jan
1
comment Compiler design in Lisp
Clisp is, I believe, only marginally compiled, unless you specifically ask for compilation. Or, at least, that was true some 10 years ago.
Jan
1
comment Is my understanding of abstract datatypes correct?
@JörgWMittag Er, no, an abstract data typr is one that is accessible through a given interface, no matter what the underlying implementation happens to be. If you're lucky, there are even time and space guarantees on the type (like, say, "popping the stack is O(1), pushing onto the stack is amortized O(1), space is O(n) on items in the stack".