Reputation
15,865
Top tag
Next privilege 20,000 Rep.
Access 'trusted user' tools
Badges
1 39 63
Newest
 Good Answer
Impact
~216k people reached

Jun
12
awarded  Nice Answer
Jun
12
comment Why do programs use call stacks, if nested function calls can be inlined?
I am skeptical of that but regardless that's not what I claimed.
Jun
12
comment Why do programs use call stacks, if nested function calls can be inlined?
It's very debatable is CPS has no "call stack". It's not on the stack, the mystical region of ordinary RAM that has a little bit of hardware support through %esp etc., but it still keeps the equivalent bookkeeping on an aptly named spaghetti stack in another region of RAM. The return address, in particular, is essentially encoded in the continuation. And of course continuations are not faster (and it seems to me this is what OP was getting at) than making no calls at all via inlining.
Jun
12
comment Why do programs use call stacks, if nested function calls can be inlined?
@JacquesB Many optimization algorithms are quadratic, cubic, or even technically NP-complete. The canonical example is register allocation, which is NP-complete by analogy with graph coloring. (Usually compilers don't attempt an exact solution, but only a couple of very poor heuristics run in linear time.) Many simple, one-pass optimizations need superlinear analysis passes first, such as everything that depends on dominance in control flows (generally n log n time with n basic blocks).
Jun
12
revised Why do programs use call stacks, if nested function calls can be inlined?
deleted 38 characters in body
Jun
12
answered Why do programs use call stacks, if nested function calls can be inlined?
Jun
5
revised With sufficiently advanced static typing, what are the advantages of dynamic type systems?
added 742 characters in body
Jun
5
answered With sufficiently advanced static typing, what are the advantages of dynamic type systems?
Jun
5
answered Testing concurrency/thread-safety
Jun
4
comment Round amounts internationalized
Rounding is different from truncating. Maybe different rounding modes are of different popularity in different countries, but I've never heard of anyone who says "round" to mean "truncate" (which is what floor does, really).
Jun
3
comment Why don't Windows/Linux use relational Databases (RDBMS)?
@gnasher729 The file system is a very particular kind of database, and as such only good for particular kinds of data. Other kinds of data are better served with different kinds of databases (e.g. relational).
Jun
3
comment Why don't Windows/Linux use relational Databases (RDBMS)?
A file system is a database.
Jun
2
comment Unit Testing Competition
You don't seem to quite realize the full extent yet. Any measure of who wrote the best test cases will either be completely subjective or have these problems to some degree. What metric works best will depend on your goals for this competitions and on how mature (i.e., unlikely to exploit the scoring rather than writing the best tests they can) the contestants are.
Jun
2
comment What stops C from being compiled/interpreted/JIT'ed?
@MichaelT But LLVM as used by Clang and Dragonegg doesn't do any of those things. "LLVM" doesn't even stand for "Low Level Virtual Machine" any more, the acronym is a misnomer and discontinued. While we're talking about C, LLVM is just an intermediate representation with an optimizer and a machine code generator.
Jun
2
comment What stops C from being compiled/interpreted/JIT'ed?
@MichaelT LLVM has nothing to do with this question. LLVM IR is not portable.
Jun
2
answered Difference between PyPy and JVM
May
31
answered Name of data structure that's tree-like with multiple root nodes
May
24
comment How to design for good abstractions using algebraic data type?
Of course you can implement it as a sum type. The question is whether that's the best approach. (This is not simply a more interesting question, it's also the question OP asks.) Not making it a sum type but rather representing the different cases with distinct, though interrelated, types basically informs the type system of the state so errors like trying to change the headers of a response after the start of streaming can be prevented statically.
May
23
comment How to design for good abstractions using algebraic data type?
This theory here is too simplistic to be useful. There are disjoint cases (e.g., either the HTTP headers have been sent or not) that are useful to distinguish at the type level, as the hyper library mentioned in the question does.
May
23
revised Is is possible to write a “Brainfuck with variables” compiler?
added 34 characters in body