2,566 reputation
1015
bio website
location London, United Kingdom
age 43
visits member for 4 years, 2 months
seen 4 hours ago
Quite boring, really. Have faffed about with computers since the mid-80s, have worked as a network engineer, unix sysadmin and (occasionally) developer.

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".
Dec
28
comment Most Efficient Cache Replacement Algorithm
@barrem23 If you're doing distributed programming, there's also the "distance between the cache and the back-end storage being cached" to consider. It doesn't matter, much, if you have an SSD or spinning rust as your large, stable, storage if the storage is 15 ms away, you will always incur a minimum 30 ms round-trip anyway.
Dec
26
comment Why it is `(cons 1 (cons 2 (cons 3 nil)))` and not `(cons 3 (cons 2 (cons 1 nil)))` for [1,2,3]?
@dokkat In that case, you are appending to something by allocating a new cell and populating its predecessor-field with a pointer to the existing list. That is, on the whole, not very useful, since you usually want to traverse a list from its head and you have just turned "find next element" into an O(size-of-RAM) time operation (so, constant, but with a rather scary multiplier). Unless you are proposing double-linked lists, of course...
Nov
29
comment What's wrong with circular references?
Only a problem for ref-counting garbage collectors and they have all sorts of interesting problems (like being unable to deal with a double-linked list or a tree with parent-pointers as well as child-pointers).
Oct
10
comment Python decorators and Lisp macros
@delnan Well, I wouldn't go quite so far as to say "impossible", but you'd definitely have to work at it.
Aug
29
comment What are CPU registers?
@MasonWheeler A good choice on your part.