HackerLangs
トップ新着トレンドコメント過去質問紹介求人

supergarfield

no profile record

コメント

supergarfield
·18 日前·議論
I agree that drivers should know not to reverse on a highway regardless of local signage.

But in situations that could be ambiguous, I think this is a regional difference - the US, Australia, part of the rest of the Americas use lots of text on road signs (including literal "wrong way" signs); Europe and much of the rest of the world use far less text (including purely pictographic "wrong way" signs). Especially important in Europe where drivers just can't learn 20+ languages.
supergarfield
·23 日前·議論
If my coworker was part of a clone series of 100 million units, requesting a character sheet would be pretty reasonable
supergarfield
·先月·議論
I really want to like QBE, but declaration blocks like this make it feel like 1970s Unix code more than a modern hackable piece of software:

    int t, x, r, rf, rt, nr;
    bits rs;
    Ins *i, *i1;
    Mem *m;
    Ref *ra[4];
I think it deters some users by making it hard to read and understand the relatively subtle code in the 300 line function that follows. (Skill issue, I know)
supergarfield
·8 か月前·議論
Carmack gives updating in a loop as the one exception:

> You should strive to never reassign or update a variable outside of true iterative calculations in loops.

If you want a completely immutable setup for this, you'd likely have to use a recursive function. This pattern is well supported and optimized in immutable languages like the ML family, but is not super practical in a standard imperative language. Something like

  def sum(l):
    if not l: return 0
    return l[0] + sum(l[1:])
Of course this is also mostly insensitive to ordering guarantees (the compiler would be fine with the last line being `return l[-1] + sum(l[:-1])`), but immutability can remain useful in cases like this to ensure no concurrent mutation of a given object, for instance.