14,560 reputation
13460
bio website
location
age
visits member for 4 years, 6 months
seen 1 hour ago

Jan
2
comment Evaluate math expressions without a stack
Possible, it's just contrary to my observations (note that I'm talking about heuristics which are actually used in real-world compilers, not simply about any register allocator). As a counter-examples, a LLVM guy didn't mention graph coloring, and a paper about linear scan says it's "not based on graph coloring". Every time I encountered, it was general introduction to the topic, often immediately followed by "but we don't do that because it's slow".
Jan
2
comment Evaluate math expressions without a stack
That's kind of correct in that someone who devises a register allocator probably thinks in terms of graph coloring at least part of the time. But saying the resulting compiler is "using graph coloring" is like saying a GPU is solving the rendering equation. It's overstating what actually happens by mixing up the knowledge of the programmer with the implemented algorithm. I'm likely too harsh, I'm just rather tired of that meme and related ones.
Jan
2
comment Evaluate math expressions without a stack
Actually, real-world compilers rarely use graph coloring because it's just too damn slow (NP-compile). Instead, every register allocator I've seen uses some heuristic (e.g. linear scan).
Jan
2
comment Use Queue<T> or stick to native f# lists
RE sitting well with purely functional programming: There are multiple persistent queues that perform reasonably well (cf. Okasaki's Purely Functional Data Structures). They're not trivial to implement and understand though.
Jan
1
revised How can variables be created at runtime?
added 218 characters in body
Dec
31
answered C++ name mangling and linker symbol resolution
Dec
29
comment Why aren't user-defined operators more common?
I don't see how the parts about operator overloading apply to defining completely new operators.
Dec
29
comment Why aren't user-defined operators more common?
So you're also in favor of prohibiting, for example, single-letter names at language level? More generally, not allowing anything in the language that seems to do more harm than good? That's a valid approach to language design, but not the only one, so I don't think you can't presuppose it.
Dec
29
comment Why aren't user-defined operators more common?
The same could be said of all operators. What makes them good, and can also make user-defined operators good (if they're defined judiciously), is this: Despite the character used for them being just a character, widespread use and possibly mnemonic properties make its meaning in source code immediately obvious for those who are familiar with it. So your answer as it stands isn't that convincing IMHO.
Dec
29
comment Is a day really 24 hours long?
Side note: With the half-open interval [start, end) you'd say end = first instant of the next day (in your example, 00:00:00 on the 14th) and by the definition of that kind of interval, that's the first point that's not part of the range you describe (so you don't have to worry about "the end being very very close to" that).
Dec
29
comment Software licensing: free [as in gratis] and copyleft
The freedom to (attempt to) make money from code is a freedom included in pretty much every definition of open source and free software. If you want to prohibit that, it's neither open source nor free software.
Dec
28
comment GPLv3 Project with BSD Library
Does the BSD require attribution in code that interacts with it? I was under the impression that it requires that for "redistribution of the code", meaning you must not rip it out in the copy you distribute.
Dec
28
comment Desktop framework with rich HTML/CSS interface and strange 'desktop native language support'
Then it's not "all you need" anymore ;-) It can certainly be done, though it's apparently not trivial (judging from how rarely this happens).
Dec
28
comment Desktop framework with rich HTML/CSS interface and strange 'desktop native language support'
Though that makes the user interface dependent on the browser, with all its baggage and potential compatibility problems.
Dec
27
comment is it okay to remove copyright info from a free, open source API even if you are explicitly told not to do so?
If you're explicitly told not to do X, then you better have damn good reasons to do X, regardless of what the court says (if it's even involved).
Dec
27
revised Is true multithreading really necessary?
edited body
Dec
24
comment Why don't modern libraries use OOP
Yeah, there are quite a few projects that attempt to wrap OpenGL with more C++ish interfaces (I even have one myself, though I refrain from many features and mostly add overloading and such). My impression is that most add a lot of baggage which makes it both harder to translate pure OpenGL snippets and harder to apply standard optimizations (look up Data-Oriented Design; some game devs swear by it). But by all means don't let that deter you. Alternatively, you may have more luck using a whole game engine (such as Irrlicht or Ogre) rather than just a bare-bones graphics API.
Dec
24
comment Why don't modern libraries use OOP
Apart from that, neither OpenGL nor are "modern" in the sense that they're young, or at least able to adopt fancy new faetures. Both have a long history (OpenGL 1.1: 1997; SDL: 1998) and backwards-compatibility constraints.
Dec
24
answered Why don't modern libraries use OOP
Dec
24
comment In functional programming, does having most of the data structures immutable require more memory usage?
Out of interest, which implementation of which languages do reuse space as you described near the end?