11,930 reputation
12853
bio website
location
age
visits member for 4 years, 1 month
seen 10 mins ago

Oct
3
comment How is it possible to write the compiler of a programming language with that language itself
@ddyer I took "the first version" as "the first version anywhere". Of course you can trivially use a cross compiler to port an existing interpreter to a platform the language hasn't been implemented for yet.
Oct
3
comment How is it possible to write the compiler of a programming language with that language itself
Of course, this requires having an interpreter in the first place. While this gets around the letter of the title (it's a pity so many people are so confused about the relationships of languages, compilers and interpreters), it's exactly equivalent once we shed the misconception that a compiler is somehow more of a language implementation than an interpreter. IOW bootstrapping is relevant regardless of whether the language implementations in question are interpreters or compilers.
Oct
3
comment How is it possible to write the compiler of a programming language with that language itself
@jk. Sadly we can't close it as duplicate of those, so I propose we move it to SO and close it as duplicate there.
Oct
3
comment Built-in Context-and-Input-to-Output-Hashing in Compilers
Recompiling dependencies but nothing else is a nontrivial problem with some languages, yes, but I don't see anything in your proposal addressing that.
Oct
2
comment Why don't computers store decimal numbers as a second whole number?
Don't you mean four bits (not bytes) in the BCD paragraph?
Oct
2
comment Why don't computers store decimal numbers as a second whole number?
Decimal floating point (which is what you're referring two, just in a more awkward representation) is no more inaccurate than binary floating point. The only difference is which values can't be represented, and because we're used to the decimal system we don't notice the errors of the decimal version. And no, neither can represent all rational and irrational numbers.
Oct
2
comment Built-in Context-and-Input-to-Output-Hashing in Compilers
Because that's the job of a build system, not the job of a batch compiler?
Oct
1
answered What are the problems python 3 new features solve?
Sep
29
comment Should an object know its own ID?
To remain abstract, if there is no reason to store information, don't store it. It just creates headaches.
Sep
28
comment From where is a DES key generated?
It's not easy to explain without either getting bogged down in theory or omitting dangerously many criteria, but the short and inaccurate version is that you generate a random number of the appropriate order of magnitude. I'm hoping for someone with more crypto knowledge than me writing a proper (read: actually reliable and accurate) answer.
Sep
28
comment From where is a DES key generated?
Which other (somewhat modern) ciphers do you know? Where does the key for those some from?
Sep
27
comment How to effectively do manual debugging?
@DXM Take the context into account, this question presupposes debuggers aren't available. But apart from that: I have used debuggers, and they are useful. But don't knock the tools . Logging is nevertheless vital, especially when it's hard to reproduce the bug -- and "judiciously placed print statements" are a quick and simple alternative to that. Careful thought is always required, no matter how many/great tools you use.
Sep
26
comment What are the options for setting up a UNIX environment to learn C using Kernighan and Richie's The C Programming Language?
Great, carry on then :)
Sep
26
comment What are the options for setting up a UNIX environment to learn C using Kernighan and Richie's The C Programming Language?
GCC is available without Cygwin, via MinGW.
Sep
25
comment Differential and integral calculus for programmer
@Dima Okay, I'll give you that. It's only a small subset though. As the guys at cstheory.SE how often they do calculus.
Sep
25
comment Differential and integral calculus for programmer
Re 1: Theoretical computer science is indeed a kind of math, but it's a very far shot from calculus (the kind discussed here; I am aware that the term is also used in various computer science contexts, for very different things).
Sep
25
comment Designing Algorithm Flowchart Application
An adjacency matrix requires O(|E|^2) space, and is therefore prohibitively expensive for sparse graphs of nontrivial size. And CFGs are definitely very sparse. Adjacency lists are much better for sparse graphs, even though they lose for denser graphs. When you have a hundred nodes but only 150 edges (instead of several thousands) the difference starts to matter. The matrix representation is also very awkward when you don't test for edge presence but want to enumerate the edges, which seems necessary for visualization.
Sep
24
comment Case insensitive keywords in a language
@Ben Editors can (and do) fix casing as you type regardless of the rules of the language. Allowing errors which nevertheless slip through (e.g. because you don't have a fancy editor at hand) does not help. It means leaving a problem around, instead of complaining about it to fix it. Moreover, once I do use consistent capitalization, I can have multiple identifiers differing in case, but denoting very different things and being easy to parse for humans thanks to context and capitalization, without ambiguity.
Sep
24
comment Case insensitive keywords in a language
@Ben ... in these and other contexts, I don't see case sensitivity as a restriction. I see it as freeing up redundant symbols to be used in a more productive manner, through conventions which communicate meaning though, among other means, capitalization. Like any terse domain-specific notation, this may seem alien to the layman but allows the experts to communicate better and more quickly.
Sep
24
comment Case insensitive keywords in a language
@Ben Let me make an analogy. Mathematical notation is, unlike programming languages, exclusively for humans. The usual argument of case insensitivity being a historical artifact of ancient computers does not apply here. Yet I doubt any mathematician would argue that a and A should be interchangeable. They case consistently, with no exceptions. For instance, in some contexts upper case letters are used for sets while lower case letters are set members. Another example occurs in electrical engineering, lower-case being time-dependent and upper case being time-independent...