955 reputation
511
bio website
location
age
visits member for 3 years, 10 months
seen Nov 2 at 0:18

Sep
10
comment Correct terminology in type theory: types, type constructors, kinds/sorts and values
I should say, ghci's :kind command gives the kind of Num as * -> Constraint. That could be specific to GHC, I don't know.
Sep
10
comment Correct terminology in type theory: types, type constructors, kinds/sorts and values
Could you clarify/extend the section about 'Kinds'? In Haskell, a type has kind *, while a type constructor (with one argument) has kind * -> *. Constraints such as (Num a) => a (meaning "any type a that is an instance of the Num typeclass") are not themselves kinds. The typeclass Num is not a 'kind' itself, but has the kind * -> Constraint. I find it difficult to relate the Haskell idea of a 'kind' (which I assume is closely related to kinds in type theory?) to the examples you give.
Sep
7
comment Why does “charset” really mean “encoding” in common usage?
You talk about character sets as "a set of Unicode characters", as though someone started with Unicode and then picked subsets. It is more accurate to say many character sets existed prior to Unicode's invention (or at least prior to Unicode becoming ubiquitous), and Unicode is deliberately constructed to be a superset of them.
Sep
7
comment Why does “charset” really mean “encoding” in common usage?
It looks to me like the 'charset' parameter was already present in RFC 1341 (June 1992).
Aug
17
comment Commenting regular expressions
Rather than storing the pattern in a variable, you can use re.compile at the point where you define your pattern, and only store the resulting object. That way, the pattern compilation flags (including re.VERBOSE) don't need to be separated from the pattern itself.
May
2
answered Lexing: One token per operator, or one universal operator token?
Apr
21
comment long lines in git or svn
Subversion does not use a line-based diff in its storage, it uses xdelta (a binary diff algorithm). It is not necessarily true that longer lines will result in larger xdeltas.
Jan
17
comment Is there already a “Binder” data-structure?
Related: Gap buffer
Jan
8
awarded  Enlightened
Jan
8
awarded  Nice Answer
Jan
6
awarded  Yearling
Jan
2
answered “/*@null@*//*@out@*/” in C function declaration
Nov
2
comment Is it reasonable to null guard every single dereferenced pointer?
My guess is that @KristofProvost is talking about OSes that use overcommit, for which malloc always succeeds (but the OS may later kill your process if there isn't actually enough memory available). However, this is not a good reason to skip null checks on malloc: overcommit is not universal across platforms and even if it's enabled, there may be other reasons for malloc to fail (e.g., on Linux, a process address space limit set with ulimit).
Sep
17
comment Which is the better: a <= b or a < b+1
"the second parameter to range() isn't an upper bound, it's the number of values to generate". This is incorrect. The second parameter to range most definitely is an upper bound. Try range(5,10), for example.
Jun
28
awarded  Nice Answer
Mar
23
answered Why is Java boolean primitive type name not 'bool'?
Mar
21
comment Why is Java boolean primitive type name not 'bool'?
The Oak language specification (version 0.2, copyrighted 1994) also includes the boolean type. (Oak was later renamed to Java). That pushes the dates even closer, though I still see no definite evidence to show precedence, or influence, in either direction.
Mar
21
comment Why is Java boolean primitive type name not 'bool'?
According to Evolving a language in and for the real world: C++ 1991-2006, the bool type was introduced to C++ in 1993. Java included boolean in its first release in 1995, but the Java project itself was started in 1991. Without finding further sources of information, it's not clear to me which came first, or what (if any) influence they had on each other.
Mar
21
comment Why is Java boolean primitive type name not 'bool'?
"I think C++ had decided to use bool quite a bit earlier than Java decided to use boolean" Why do you think that?
Jan
6
awarded  Yearling