Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
seabee
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
seabee
11y ago
Time and space are bounded by gas; that ought to be a sufficient guarantee.
32.
▲
by
seabee
11y ago
In the last snippet the function returns BigObject&&.
33.
▲
by
seabee
11y ago
The 'object up the stack' is an rvalue reference. While we've successfully returned a reference into the caller's stack frame (RVO), the object it referred to has already been destroyed. That's why you see 'con
34.
▲
by
seabee
11y ago
There is another subtlety that values associated with integer keys are stored as an array. dicts and HashMaps don't do this.
35.
▲
by
seabee
11y ago
If that was his argument I'd be happier with it. As described, his goal was to encode comments in the function name and describe caveats in test cases; none of those steps sound like 'write a javadoc'. Javadoc and comments ar
36.
▲
by
seabee
11y ago
Your argument is not an argument against comments, it's against any kind of description. Your code works just as well if you assigned each function a unique number starting from 'func0' - that's how code obfuscators or m
37.
▲
by
seabee
11y ago
IME this also happens not because the function is reused, but because the programmer is trying to create functions at a 'high level of abstraction'. Usually this means one function that has a bunch of descriptively-named function
38.
▲
by
seabee
11y ago
Since you're already using Lua, maybe you'll have an easier time switching to Terra. It supports SIMD, and you only need to deal with embedding LLVM. http://terralang.org
39.
▲
by
seabee
11y ago
Well, the correct solution means you never want to examine each ball more than once anyway. It's the kind of constraint you can consider as existing 'outside' of the algorithm.
40.
▲
by
seabee
11y ago
Seems like the key insight into solving problem 1 is constructing the unconditional jump operation. From what I remember of my Cambridge interview, the questions they asked weren't anywhere near as interesting as these.
41.
▲
by
seabee
11y ago
IME refactoring optimises for a local minima of code entropy. Any time you want to add new functionality, you're going to have to jump back out into 'mess' to implement the feature, then 'fix' it again with further
42.
▲
by
seabee
11y ago
Unless I misunderstand your point, how do you create complex data without complex code? I agree with the sentiment, but priority queues don't organise themselves. It seems more like its about the abstractions you use.
43.
▲
by
seabee
11y ago
I see this sometimes in code at work. As soon as you need to stuff one of the 'const' objects into any kind of container you start requiring unique_ptrs everywhere, and then you start thinking how much easier your life would be if
44.
▲
by
seabee
11y ago
You can see this with Rust which tries to satisfy the same niche. It's possible to avoid the gotchas in C++ while preserving the advantages, you just pay a different price by working harder to satisfy the compiler.
45.
▲
by
seabee
12y ago
Describing what they are may be too hard for a HN comment, but what they achieve is easier. Traits are the way Rust supports both dynamic dispatch and static dispatch in polymorphic functions. C++ supports both kinds of dispatch too, but th
46.
▲
by
seabee
12y ago
Android is the leader by market share but iOS leads mind share. Android isn't a strong brand. Samsung, HTC, Sony, LG et al put their own corporate branding ahead of whatever Android version they use. Amazon barely mentions its existenc
47.
▲
by
seabee
12y ago
He didn't ask for his name to be published and she outed him under her real name on her employer's Twitter account. 'The patriarchy' is not conspiring against her to keep her name public, it's just maintaining the s
48.
▲
by
seabee
12y ago
Subroutines are not "named blocks of code" any more than they are facilitators of code reuse. Inline comments around a block of code also matches the concept of a named block of code. The point of subroutines is to gather the code
49.
▲
by
seabee
12y ago
For that to work, you need to enumerate either the acceptable failures (network timeouts) or the unacceptable failures (logic error). However, for idempotent actions, why does it matter what caused the exception? The worst that happens is y
50.
▲
by
seabee
12y ago
Seems like potential gains aren't as motivating as actual costs.
51.
▲
by
seabee
12y ago
Parent is wrong though. Nobody is granting anybody power. Hank's employer had the power to shrug off the episode and keep employing him. Instead, they ceded their power to a minority/controversial view. Adria's employer, on
52.
▲
by
seabee
12y ago
Aliasing is only a problem because they prevent you assuming two values are independent of each other: a write to one could affect the other, if they are aliased. When you enforce immutability of aliases, as Rust does, aliasing stops being
53.
▲
by
seabee
12y ago
Nobody says you have to OK with something you mitigated against. I remember on several occasions fighting Visual C++ over code it bombed out on. Having a precompiled header scheme to make up for poor performance. Yes it sucks, but you don&#
54.
▲
by
seabee
12y ago
Lest we forget, the first engineers relied on folk wisdom and empirical knowledge before rigorous processes and accurate physical models existed. That also means we have a few millenia of catching up to do!
55.
▲
by
seabee
12y ago
There's no controversy because these goals are always seen through the lens of society as a whole. Groups like the AAMN helps people who are generally privileged achieve parity in an area where they are currently stigmatised. They don&
56.
▲
by
seabee
12y ago
> No new indoor mall has been built in the US in 10 years. This does not imply that malls are dying. Existing malls may be expanding, e.g. the largest in NY started another round of expansion in 2007 and shops are still opening up in the
57.
▲
by
seabee
12y ago
The depiction of the Arab terrorists in that film was intentionally shallow and not particularly focused on Islam; the worst message you can get from it is 'Muslims are dumb terrorists' which, while hurtful, is nowhere near ridicu
58.
▲
by
seabee
12y ago
The reason why you bundle installers like this is to catch the 'press yes to everything' group of users. In this case it's done for the greater good (mostly), most users don't care about security updates or upgrading out
59.
▲
by
seabee
12y ago
DrRacket (the default IDE for the Racket language) has a keyboard shortcut specifically to insert this symbol. I use it a lot!
60.
▲
by
seabee
12y ago
I don't think the sloganeering is hastily thought, I don't think it is thought at all. It doesn't need to be. Freedom of expression ingrained in Western culture and you would find it very difficult to believe someone should b
More ›