Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
lorenzhs
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
83 ms
·
811.
▲
by
lorenzhs
10y ago
That the C code is compiled with "gcc -O7" tells me just about everything I need to know about the soundness of these experiments. "-O3" and "-Ofast" are the highest optimisation levels, where "-Ofast"
812.
▲
by
lorenzhs
10y ago
The addone function in C++14 would look something like this: auto addone = [](auto x) { return x+1; }; That monstrosity at the top of the article is needlessly complex because C++11 didn't support generic lamdbas.
813.
▲
by
lorenzhs
10y ago
But then we're not comparing Paris–London travel times any more. You'd probably be faster off flying from Manchester.
814.
▲
by
lorenzhs
10y ago
Yes, for that I usually use maps.me which is based on OSM. But most people don't know about these or find it too cumbersome to have to download the maps upfront, etc. Google's offline routing is also a lot better and faster.
815.
▲
by
lorenzhs
10y ago
Eurostar have around 80% market share on Paris–London for good reason. At 2hrs 15mins from city centre to city centre it's faster, less hassle, and more comfortable than flying. Security is less strict (you can take liquids) and you do
816.
▲
by
lorenzhs
10y ago
In computer science it's used to express asymptotic behaviour. This suppresses lower-order terms and constant factors, so O(2n + log(n)) = O(n). The most common ones used are upper bounds O(•), asymptotically equal behaviour θ(•), and
817.
▲
by
lorenzhs
10y ago
I don't think so, but Google Maps does on both iOS and Android. Quite handy when abroad.
818.
▲
by
lorenzhs
10y ago
Pretty sure the GP is referring to GitHub's statement with "that", not the 640k quote. Nobody will quote the probability of a false positive of a SHA1 collision detector in 15-20 years.
819.
▲
by
lorenzhs
10y ago
This is an instance of Muphry's law, which states that when berating others for editing or spelling mistakes, one is bound to commit a similar or worse offence. There are several other occurrences in this thread.
820.
▲
by
lorenzhs
10y ago
You're lumping together different kinds of rating systems. Netflix just wants to recommend you stuff you might like, which is a very different problem from scoring things on an absolute scale (grades, IMDb, game critics). Facebook li
821.
▲
by
lorenzhs
10y ago
Most 3D plots are terrible because there's an inherent loss of information when flattened onto a 2D screen or piece of paper. Not only that, but you can't read off absolute values from a 3D chart without every point being labelled
822.
▲
by
lorenzhs
10y ago
200 GWh/year is a little less than 23 MW. A full power plant is on the order of several hundred MW to around a GW. You also don't need to replace the power plant every year. I agree that standby power usage is terribly wasteful bu
823.
▲
by
lorenzhs
10y ago
Please don't turn this into yet another debate on whether making helmet use mandatory is a good idea.
824.
▲
by
lorenzhs
10y ago
I think flamebait is the correct word, because the discussion would have just ended in the usual "modern web" complaints interspersed with people saying that these things have legitimate uses, and so on and so on. They're nev
825.
▲
by
lorenzhs
10y ago
Why an x220? That's a six-year old device that predates many modern security features. Secure Boot isn't evil, works just fine with Linux, and TPMs are useful, too. But the most important thing to do is encrypt your drive, which y
826.
▲
by
lorenzhs
10y ago
Firefox for Android has addons, so you can use uBlock Origin. That seems to be the go-to solution for many Android users. But just like content blockers on iOS, it won't affect other apps.
827.
▲
by
lorenzhs
10y ago
Yeah but it should work in C++03 if you just '#define nullptr NULL'. Not saying it's good practice but C++11 usage is very light.
828.
▲
by
lorenzhs
10y ago
Kind of an ironic comment on an article about how the maker of said software is lobbying to keep taxes complicated so they can continue to sell you their software, isn't it? :)
829.
▲
by
lorenzhs
10y ago
Not to be overly nitpicky here but it's spelled "systemd", not "SystemD". From its website: Yes, it is written systemd, not system D or System D, or even SystemD. And it isn't system d either. Why? Because it&
830.
▲
by
lorenzhs
10y ago
No problem at all if you use a TrackPoint. I don't even have a mouse, I use the ThinkPad USB keyboard at work which includes a TrackPoint. I know some people dislike them with a passion, and they don't look fashionable, but I can&
831.
▲
by
lorenzhs
10y ago
Well if you'd like to select the k-th biggest element from a distributed array it's impractical - if not impossible - to send everything to one machine so another approach is needed. A fairly simple algorithm would select a pivot
832.
▲
by
lorenzhs
10y ago
That seems entirely unrelated to tail call optimisation though? For once, "return foo(bar, baz)" isn't returning a named value, it's returning an rvalue. Secondly, return value optimisation doesn't optimise away the
833.
▲
by
lorenzhs
10y ago
Yup, exactly. It's a fun area that gets even more interesting when you look at distributed systems, where every node only stores a small portion of the overall data and you want to keep communication volume low.
834.
▲
by
lorenzhs
10y ago
No, as per my previous comment, it t does not use a heap. It's like quicksort, but only doing one of the recursive calls: - choose a pivot p randomly from the elements - partition into elements <= p and > p . This takes time
835.
▲
by
lorenzhs
10y ago
For more on that story, see http://www.thespacereview.com/article/70/1 (article has two pages, link to the second at the very bottom)
836.
▲
by
lorenzhs
10y ago
Appears to be C++11, which is contained twice in your list. C++20 doesn't exist yet. C++17 isn't finished either. It doesn't appear to use new language features, only some library things like std::unordered_map, from what I g
837.
▲
by
lorenzhs
10y ago
But std::distance(first, last) is how n is defined. std::nth_element is typically implemented using a fancy version of quickselect called introselect. You can imagine quickselect as a version of quicksort where the recursive call is only
838.
▲
by
lorenzhs
10y ago
But it can be implemented iteratively instead of recursively, so that there is only one stack frame. O(1) space for binary search is entirely possible. The link demonstrates both versions, the iterative one uses O(1) auxiliary space and the
839.
▲
by
lorenzhs
10y ago
Apparently this changed in September 2016. Previously, watching non-live content didn't require a TV licence.
840.
▲
by
lorenzhs
10y ago
Of course not. The article is just oversensationalised. The paper doesn't make the same broad claims as the article.
More ›