8,018 reputation
22438
bio website
location Bellingham, WA
age 33
visits member for 4 years, 5 months
seen 7 hours ago

1d
comment are multithreading, multiprocessing, multitasking implemented at instruction set or OS?
@Jules: Interesting. Good to know. I think I made reference to a related idea, however: see GreenArrays.
2d
comment are multithreading, multiprocessing, multitasking implemented at instruction set or OS?
@whatsisname: True, but at a conceptual level, there's little difference between software multithreading and hardware multithreading beyond implementation.
2d
comment are multithreading, multiprocessing, multitasking implemented at instruction set or OS?
@Tim: Yes. How would you expect them to be implemented in the OS, when the terms "pipelining" and "superscalar architectures" relate specifically to how the CPU executes instructions, and vector computation is a term reserved for single-instruction-multiple-data CPU architectures?
Jan
7
comment Needs (in principle) C++ parenthesis around if statement condition?
The standard could be changed, yes, but he'll have to take that up with the committee. I don't see any reason they'd accept it, though.
Dec
29
comment Is every language written in C?
@BasileStarynkevitch: If something can not be done in portable C, then it can not be done in non-portable assembly language. By your assertion, Haskell can't exist. No, continuations, closures, etc., can all be simulated straight-forwardly using well-known and common techniques. Realize that all of those things you named can be done just by clever manipulation of stack allocations (with the exception of closures, which can be done trivially on the heap; remember that C++ recently got closures and is getting continuations in a future standard, both of which already exist in libraries.)
Dec
28
comment Is every language written in C?
@BasileStarynkevitch: Why?
Dec
28
comment Is every language written in C?
@BasileStarynkevitch: This is why C is called the lingua Franca of programming. It's so ubiquitous that it's the standard for all FFI, so it's nearly impossible to find a language that doesn't have a C interface of some kind. If there is a modern language that doesn't use C somewhere, I don't know of it, but ML dialects and languages like Fortran and Pascal have historically minimized the presence of C, either by predating it or because they're effective systems languages already.
Dec
26
comment Is every language written in C?
@mathguy54: There are more than one implementation of each, but: OCaml is bootstrapped with C and written in its own ML dialect. Glasgow Haskell is written in Haskell and compiles to C. There are hundreds of Scheme compilers, some written in C, some in Scheme, some in ML, several in JavaScript, and many others. The goal of most languages is to be self-hosting, so that they can compile their own source code. C is a common starting point, but it is by no means the only one.
Dec
23
comment Is every language written in C?
@MichaelT: To be fair, most of it is still basically C, but depending on C++ features. That's what I mean.
Dec
23
comment Is every language written in C?
Of course, GCC is now being rewritten in C++, but that's not as important as the fact that the first C compiler couldn't be written in C.
Dec
12
comment Implement a new Unicode encoding in a suitable open-source text-editor?
@MilindR I think you're confused about something, but I'm not sure what. The Unicode blocks are arranged as a standard against which fonts can be developed. If you're talking about making your own Unicode-like mapping, that is a massive undertaking that has previously involved the efforts of international committees, and is well outside the scope of what an individual can do alone. If you're talking about encodings like UTF, please read RFC-2279 and look up how the idea came about - it's the standard because any other approach would be needlessly convoluted.
Dec
3
comment What can C++ do that Python cannot?
Put another way, C++ offers tools to meet a requirement of completing a computation within a resource-limited (time-limited, memory-limited, etc.) window. For example, many games have the requirement that all work done for a given frame must be completed in less than 16 milliseconds to achieve a consistent 60 frames per second. The more complex the work, the harder it is to stay within that window.
Nov
27
comment Getting your user agreement right
@rmayer06 The question is one about legal matters, for which no one here is qualified to answer. An attorney who is well-versed in user agreements can clarify what issues need to be addressed, and more importantly, how to word the agreement to protect him from litigious users.
Sep
26
comment Why do most programming languages have special keyword or syntax for declaring functions?
Just FYI: Your second "why not" example is syntactically identical to CoffeeScript.
Sep
8
comment Should a developer know the inner workings of the computers' hardware?
@AndrewHill: When is that a hardware matter and not an algorithmic one? The question is about understanding low-level hardware behavior, not high-level algorithms.
Aug
24
comment Why does void in C mean not void?
@Snowman: Your most recent comment is a much better description of what void is than your answer: It is, literally, the absence of type. Simple as that. And, having no type, it can have no value; so a type of pointer to void is a pointer to nothing in particular, just a location in memory.
Jul
18
comment What was Ruby used for before Rails?
@djechlin: Anything. Everything from build systems to web applications. Rails is merely a framework. Asking what it was used for before it got one of several dozen web frameworks implies it has no use without that framework, which is patently ridiculous. It was used for all of the same things that Python, PHP, Perl, and a dozen other languages were used for.
Jul
9
comment What do you think was a poor design choice in Java?
@Andrea: Unlike Java, Scala has the privilege of having a stronger type system from which weaker generics can be generated. You can always go to weaker typing, but you can't always go stronger.
Jun
20
comment Learning computer architecture as a programmer
For the record, the books assume C or C++ (which includes Objective-C, as it's a strict superset of both), and discusses inline assembly. It doesn't get much more "high-level" than that.
May
12
comment Can C++ be used as a server-side web development language?
@PaulDraper: Does it matter? The point, and implication, is that the reason Facebook moved away from using a pure PHP infrastructure is the expense of scaling, specifically because of the execution overhead of PHP interpreters. Surely that's changed, but my point stands, unaltered.