Reputation
60,454
Next tag badge:
139/100 score
17/20 answers
Badges
13 179 261
Newest
 Good Answer
Impact
~2.1m people reached

Apr
29
comment How can one think of a relational schema in terms of storing it in a NoSQL database?
Because you can't really model the words of a lyric in a relational way to the song. Nope, absolutely not. Afterall, it's not like "full text search" is a thing that's existed for years and years in SQL databases. Nope, just a pipe dream, that...
Apr
27
comment Why do most mainstream languages not support “x < y < z” syntax for 3-way Boolean comparisons?
Not really. Put 1 < 2 < 3 into Java or C# and you don't have a problem with operator precedence; you have a problem with invalid types. The issue is that this will still parse exactly as you wrote it, but you need special-case logic in the compiler to turn it from a sequence of individual comparisons to a chained comparison.
Apr
27
comment Why do most mainstream languages not support “x < y < z” syntax for 3-way Boolean comparisons?
This will still parse with a normal grammar in pretty much any mainstream language; it just won't be understood correctly for the reason @RobertHarvey gave.
Apr
27
comment Why do most mainstream languages not support “x < y < z” syntax for 3-way Boolean comparisons?
Wow, does Python support that syntax? I didn't know that; the only place I've ever seen it is in Oxygene.
Apr
26
comment Determining if webgl code will work on a variety of hardware
No, that's the whole point: the same thing is not true of CPUs. If you're developing a program for Windows, you can assume the existence of the standard x86 (or x64) architecture, if you're developing for Android, you can assume a JVM, and so on. But GPU hardware hasn't come anywhere near that level of homogeneity.
Apr
26
comment Determining if webgl code will work on a variety of hardware
Why? You can get away with distributing binaries for the main game code because you know the instruction set and basic architecture will be the same for every system you're developing this build for, but that assumption is nowhere even close to being valid for GPU hardware, so what other choice is there but to distribute source and compile it on the target system?
Apr
26
comment Determining if webgl code will work on a variety of hardware
when webgl compiles a fragment shader at runtime (... WHYYYYYYyyyyy) What else do you expect it to do? A shader is code that is executed on the GPU; how's it going to run if it's not compiled?
Apr
21
comment What's so difficult about SVN merges?
@LimitedAtonement You get code from one to the other by merging commits from one branch to the other. This is a pretty common workflow when working on a commercial project that has multiple active versions: you check a fix in to v1, then merge that commit forward: from v1 into v2, and then from v2 to v3. That's completely different from merging one branch into another.
Apr
21
comment Breaking the contract: throw exception or do nothing?
@dabadaba Yes, that's the philosophy in a nutshell: if anything goes wrong, Fail Fast, because failure is better than accepting corrupt data.
Apr
21
comment Breaking the contract: throw exception or do nothing?
@dabadaba You would throw an exception describing what the problem is, and at some point up the the call stack, code that originated the incorrect player ID would catch this exception and deal with it appropriately, usually by either logging the error and sending a report to the developers (if it originated internally) or displaying an error message to the user (if it originated with a user).
Apr
21
comment Why does FSharpLint suggest, “In F# code, use 'e1 || e2' instead of 'e1 or e2'”
Which raises the question, why is the language so inconsistent?
Apr
21
awarded  Good Answer
Apr
20
answered Breaking the contract: throw exception or do nothing?
Apr
19
comment Could someone write an opensource version of the Windows API?
If its not possible to implement fork() on Windows, what of the much-ballyhooed "Ubuntu on Windows 10" feature, which was reportedly created by implementing all of the basic Linux system calls on top of Windows? Seems to me that would simply not work at all if they didn't have a working fork()...
Apr
19
comment Could someone write an opensource version of the Windows API?
@GrandmasterB Funny, I was about to use Wine as a "no" example. The Wine project has always been pretty clear about the severe limitations of what their compatibility layer can provide.
Apr
19
comment Why does the type go after the variable name in modern programming languages?
@8bittree Every language I'm familiar with that uses name-first declarations use an additional token, like : or as, between the name and the type.
Apr
19
answered Why does the type go after the variable name in modern programming languages?
Apr
18
comment Could Hindley-Milner inference work for the Go language?
@cat It's a shame. At first Go seems like a great language full of great ideas, but then you realize it has no inheritance and polymorphism, so you can't do OOP well, and it has no generics, so you can't do FP well, and you're left staring blankly at the screen asking "then how exactly are you supposed to use this language?!?"
Apr
18
comment Could Hindley-Milner inference work for the Go language?
@bishop Having done compiler work in languages with generics, I can certainly agree: it's difficult to implement without significantly complicating the implementation. I'd go so far as to even replace "difficult" with "impossible." However, that's not the point; the point is, is it worth the extra complication? And the answer, to anyone who's worked with and without generics, is obviously "yes, definitely!" I'd have to agree wholeheartedly with the claim that refusing to implement generics because "oh no, complexity" is idiotic.
Apr
13
comment How to design a dynamic thread allocator
What language are you using? From the vocabulary used here, I'd guess C# or another member of the .NET family. If so, is there anything you're describing that can't already be done by the built-in Thread Pool?