magnusjonsson

Joined 17 years ago

Karma
137
Submissions
40
Member since
May 24
View on Hacker News

Recent submissions

Comment · 7 years ago
Comment · 7 years ago
Comment · 7 years ago
But people elect the parliament and the parliament electthe PM, so it's OK, there's a chain of accountability to the populace. In HK, the parliament has only 70 seats of the 1200-member committee, and only 35 of those are geographical constituents representing the people, the rest are "functional" constituencies mostly representing businesses). Laws have to be passed by a majority of the LegCo however, and the Chief Executive can be impeached by a 2/3 majority in the LegCo, so the LegCo is still very important. The main tragedy is that only 50% of the LegCo is elected democratically.
Comment · 7 years ago
No, Hong Kong should lead the way.
Comment · 7 years ago
When I started learning Mandarin (my fourth language) I became totally unable to speak French (my third language) as the Mandarin words would pop up first in my mind. I think by now they've been sufficiently separated in my mind but I haven't had any use for my French so it as atrophied anyway. I'm now learning Cantonese which is similar to Mandarin and I'm only occasionally mixing it up with Mandarin. It seems to me the distance between languages isn't so important, you can mix up any two languages or not. It probably depends more on how much your brain has to rewire itself to acconmmodate the new language?
Comment · 8 years ago
Swedish has "nja" (blend of Swedish ja and nej).
Comment · 9 years ago
That is not what he said.
Comment · 9 years ago
That's an awesome article! Thanks for sharing.
Comment · 9 years ago
Actually those are very bad examples. In practice, compilers will produce warnings in all of those examples.

Better examples (of actually useful things) would be things like designated initializers, struct literals, declaring array lengths in args using static, etc.

Comment · 9 years ago
FWIW, the Unsafe class is generally much faster than DirectByteBuffer
Comment · 11 years ago
This does not do away the distinction between attributes and content -- that attributes are flat strings while content can be nested.
Comment · 12 years ago
Comment · 12 years ago
It's a problem. Until people have standardized on which 'better standard library' to use, programs will keep building from these too low level building blocks.
Comment · 12 years ago
The ocaml standard library is minimal to a fault. It's just enough to implement the compiler itself. For higher level operations like starts_with, you use libraries. The Batteries library for example provides what you want:

    String.starts_with line "+++"

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton