Reputation
784
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
5 10
Newest
 Commentator
Impact
~182k people reached

  • 0 posts edited
  • 0 helpful flags
  • 20 votes cast
Jan
26
comment Can the “level 256 bug” in the game of Pacman be considered an unhandled segfault?
@Snowman there is no such layer on a Pac-Man machine. There's no loader — the game is in execute-in-place ROM. There's no memory management — everything is static. There's no "services"; the game accesses hardware directly and there isn't a byte of code on the system that isn't part of the game and written for the game.
Jan
23
comment Efficient Repeating Alarm Clock in Low Level Language like C
Most systems have at least one external interrupt somewhere, so on embedded, the best solution can easily be to spend $1 on a real-time-clock chip and program it to raise an interrupt at a certain time. And then, if you have nothing else to do, put your CPU entirely to sleep. :)
Jan
22
comment Is it good practice to avoid warnings and notices?
Warnings in production should go to the logs, not to the user! Errors should go to the logs, not to the user. A website that doesn't trap errors, log them, and serve up a user-suitable error page instead isn't production ready. PHP makes it very easy to do this wrong, but you should still do it right.
Jan
21
comment If a number is too big does it spill over to the next memory location?
@MatthieuM from a language perspective, that's true. In terms of execution on a given system, which is what we're talking about here, it's absolute nonsense.
Dec
31
revised Does it make sense to use the term “Space Leak” with regard to Java?
added 39 characters in body
Dec
31
answered Does it make sense to use the term “Space Leak” with regard to Java?
Dec
9
comment When should I use Perl's DBIx::Class?
This is obvious to you, but probably not obvious to many readers (I say, having spent years in #dbix-class and #catalyst) — the key to the "don't leak the abstraction" bit is that every single thing you're working with in DBIC is a subclass of something that provides the cookie-cutter behavior. You're strongly encouraged to add methods to your subclasses, and unless you're doing a Q&D job, only the methods you wrote should be part of your public interface.
Nov
25
comment Would UTF-8 be able to support the inclusion of a vast alien language with millions of new characters?
It's not strictly necessary for the number of following bytes to always be one less than the number of leading ones in the first byte. Perl actually supports (since 2000) an internal variant of UTF-8 where the 5, 6, and 7 byte forms are the same as this answer, but FF introduces a 13-byte code unit capable of storing 72 bits. Anything over 2^36 is uniformly very expensive, but it allows encoding a 64-bit int and then some.
Oct
30
comment How are comments usually parsed?
@ArtB in general, "parsing by substitution" gets very tricky down the road with edge cases and interaction with other features, and is best avoided from the beginning.
Oct
23
comment Does an interpreter produce machine code?
@JonPurdy I would agree with that, but I would also add a class, "traditional interpreters", that don't make use of intermediate representations beyond perhaps a tokenized version of the source. Examples would be shells, many BASICs, classic Lisp, Tcl prior to 8.0, and bc.
Oct
3
revised In layman's terms, what is left recursion?
added 103 characters in body
Jun
13
comment Why do programs use call stacks, if nested function calls can be inlined?
Can someone apply some better tags to this? The only tag on the question, "functional-programming", is clearly not appropriate.
Jun
13
comment How Do News Websites E.g. Forbes / Zdnet Seamlessly Merge One Webpage into Another?
@KRyan it just modifies the offset param that skips a certain distance into the resultset. Since the default sort order seems to be "popular all time" the results are probably somewhat stable, but definitely not if you switch the sort order to "newest" and search for something popular.
Jun
13
comment How Do News Websites E.g. Forbes / Zdnet Seamlessly Merge One Webpage into Another?
@OllieFord that's what the history API stuff is for. history.pushState and history.replaceState let you change the URL in the address bar without navigating away from the current page. It's the more modern replacement of the older trick of changing the URL fragment (#something), with a big advantage being that the history API lets you push "real" URLs that the server can participate in generating, while the fragment thing has to be supported completely from the client side.
Jun
9
comment What is the “type” of data that pointers hold in the C language?
Addresses can be put into one-to-one correspondence with integers, but so can everything else on a computer :)
Apr
24
comment Explanation of how server-side programming languages are accessed
I don't think this does enough to mention the (by now very common) practice of simply having each application be its own webserver, most likely fronted by one or more HTTP proxies.
Feb
12
comment Difference between overhead of B frame and P frame
@JerryCoffin depends on the details of the format. You could imagine it to be super simple like MPEG-2. But in any case I'm hand-waving here :)
Feb
12
comment Difference between overhead of B frame and P frame
@Sara B-frames reference the past and the future. If the intermediate B-frame was a linear function of the past reference frame and the future reference frame, it could be essentially empty; it only has to code the difference between the interpolated frame and the real thing.
Dec
29
awarded  Commentator
Dec
29
comment If MVC is “Separation of Concerns” then why was Razor Syntax introduced?
@Doval Twig/Swig is an example of a logic-lite templating system that's been popular enough to be cloned into many languages; ZPT/TAL is an older one with more XML crud but the same goals. Both allow user functions for filtering and advanced conditionals, but no code in the host language is ever found in the template itself; it's more like registering a limited set of callbacks by name. The templating language itself is deliberately far from Turing-complete.