11,805 reputation
12852
bio website
location
age
visits member for 4 years, 1 month
seen 3 hours ago

Nov
9
answered Who is to blame for this range based for over a reference to temporary?
Nov
4
awarded  Yearling
Nov
4
comment Does any other language use the uniform initialization syntax found in c++?
@ThomasEding I know why C++11 uses that syntax. I was doubting the use of this question.
Nov
3
comment Does any other language use the uniform initialization syntax found in c++?
That specific syntax, braces and all? That seems awfully specific and useless. Any motivation, aside from curiosity?
Nov
2
comment Do any notable C extensions include integer types that are independent of machine word size
@RobertHarvey Sure it sounds bad, but unless you can point out such a way, you're not contributing anything by saying "nah you must be doing something wrong". The very question is how to avoid the integer promotion, or get around its effects!
Nov
2
comment Do any notable C extensions include integer types that are independent of machine word size
@RobertHarvey How? In OP's code, there is no mention of int , yet it still sneaks in. (Again assuming my understanding of the C standard is correct.)
Nov
2
comment Do any notable C extensions include integer types that are independent of machine word size
@RobertHarvey Are you sure? As I understand integer promotion, if int is larger than uint16_t, the operands of the multiplication would be promoted to int and the multiplication would be carried out as int multiplication, and the resulting int value would be converted to int64_t for the initialization of who_knows.
Nov
2
comment Generics in low level languages
@recursion.ninja The monomorphism restriction is a Haskell thing (in particular, a typeclass thing), only applies to top-level bindings without any parameters, and is not technically necessary (it can be turned off with the only consequence being possibly-slower code). Did you perhaps mean something else?
Nov
2
comment Generics in low level languages
@NSAddict Not at all, see my edit.
Nov
2
revised Generics in low level languages
added 434 characters in body
Nov
2
answered Generics in low level languages
Oct
31
comment Looking for encryption method
Three nitpicks: (1) AES is not a stream cipher (2) AES-256 has no practical advantage over AES-128. 128 bit is safe against brute force as long as computers are made out of matter and occupy spacetime, CTCs excluded. (3) AES-256's key schedule may be weaker, it's been exploited for related-key attacks and attacks only ever get better.
Oct
31
comment Looking for encryption method
Your code isn't hidden from anyone. There is no such thing in security. Even if it may turn out to be true, it's a dangerous mindset because it's tempting to put secrets in the code (when the only secret should be in a key, which can easily be replaced if anything is leaked).
Oct
31
awarded  Nice Answer
Oct
31
answered What is the actual reason that locks (sentinels) in OO are hard to reason about?
Oct
31
comment What is the actual reason that locks (sentinels) in OO are hard to reason about?
I'm torn. It's true that concurrency (with side effects; pure computations can be made concurrent without observable effects) is hard, but on the other hand, formalisms other than locks do make concurrency easier to deal with than locks, so something is certainly wrong with locks. At the very least, they are not the best abstraction for concurrency/synchronization.
Oct
30
awarded  Enlightened
Oct
30
awarded  Nice Answer
Oct
29
awarded  Guru
Oct
29
awarded  Good Answer