Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
stabbles
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
58 ms
·
781.
▲
by
stabbles
9y ago
Coincidentally on the frontpage together with the rant of Linus Torvalds
782.
▲
by
stabbles
9y ago
I created a text only version https://noslite.nl for the public news service in The Netherlands. It's 1000x smaller in size and performs just 1 request per page.
783.
▲
by
stabbles
9y ago
The need for vectorisation is a problem of the language , the user is not at fault. Take the Julia language, that has no problem with loops whatsoever.
784.
▲
Intel open sourced Parallel STL
(github.com)
3 points
by
stabbles
9y ago
|
0 comments
785.
▲
by
stabbles
9y ago
Can't be happier with this! Proof that people are willing to pay for quality. In The Netherlands we just got news that public service television etc sees an unexpected drop of income through ads (they're 60 mln euros short on budg
786.
▲
by
stabbles
9y ago
It's funny how event sourcing is being reinvented. On the backend it's called event sourcing, on the frontend it's called flux / redux. Both have their own jargon.
787.
▲
by
stabbles
9y ago
I'm curious how many HN people still use Facebook. The overall sentiment here seems to be to just quit it.
788.
▲
by
stabbles
9y ago
I'm happy to use a service that is not Gmail or Outlook. And I like the fact that I can use my custom domain easily. In the end I'm not really using it though, simply because none of my contacts uses it. In that case ProtonMail is
789.
▲
by
stabbles
9y ago
They private key is being sent to the server. Can't stress this enough. How else can you access your mail on a new device with your primary device disconnected? "Your ProtonMail private key is stored encrypted on your browser us
790.
▲
by
stabbles
9y ago
Wouldnt you get the SIMD stuff for free when compiling with `-O3` and `-march=native`? My guess would be that SIMD wouldn't improve this piece of code, because all data is touched only once and the bottleneck is memory.
791.
▲
by
stabbles
9y ago
A free function for this looks even better IMO.
792.
▲
by
stabbles
9y ago
It can be useful for debugging and (de)serialization.
793.
▲
by
stabbles
9y ago
Some good points. But "See reflection TS", really? That lands only in C++20. This article is from 2016.
794.
▲
by
stabbles
9y ago
OP complains about C-style arrays when criticizing C++. Just using `std::array` makes life easier.
795.
▲
by
stabbles
9y ago
> Calculating the size of static array In C++17 you can do #include <array> std::array myarray{ 4, 5, 6, 7, 8, 9 }; int my_size = myarray.size(); // returns 6 which even deducts the type `std::array<i
796.
▲
by
stabbles
9y ago
Server-Sent Events (SSEs) are actually a thing. Sure, the client must establish a connection with the server first, but from then on data can be streamed from the server. Similar to websockets, but then a one-way connection from server to c
797.
▲
by
stabbles
9y ago
> sharing an indent level ("ii" selects these) That doesn't seem to work. Am I missing something?
798.
▲
by
stabbles
9y ago
It's a known trick also used in the standard library of C++. For instance in multithreading { std::lock_guard<std::mutex> lock(some_mutex); ... } owns a mutex for duration of the scope. The constructor claim
799.
▲
by
stabbles
9y ago
I've tried that as well, but you need a brotli module for nginx. No problem if you're using Docker, but I just used the mainline distribution of nginx on Ubuntu 16. I'm curious if brotli's decompression is still fast on
800.
▲
by
stabbles
9y ago
I tried gzipping my static site up front on maximal compression levels. Google the `gzip_static` directive. It doesn't make a noticable difference, but it's fun.
801.
▲
by
stabbles
9y ago
One issue I have with Julia is that it is fast the second time you run your code. And developing code is mainly running things just once. In practice you might find yourself waiting on compilation a lot.
802.
▲
by
stabbles
9y ago
Do you still have a reference for that?
803.
▲
by
stabbles
9y ago
Haven't timed it, but it is fast. You can see how quick the assembly is generated on godbolt [1] And that verifies it is fully compile-time indeed :). [1] https://godbolt.org/g/VHvxhi edit: it is about 1 second up
804.
▲
by
stabbles
9y ago
This has _not_ the same time complexity as the sieve of Erasthones.
805.
▲
by
stabbles
9y ago
Maybe stop the outer loop as soon as i * i > n then as well. Also, where's the check whether `i` is actually prime before you start crossing off multiples? You don't need to cross off multiples of composite numbers.
806.
▲
by
stabbles
9y ago
My Project Euler prime sieving / counting code was vector<uint8_t> is_prime(n, true); // Sieve for (uint64_t k = 3; k * k < n; k += 2) if (is_prime[k]) for (uint64_t multiple = k * k; multiple <
807.
▲
by
stabbles
9y ago
In C++ we do it compile time :) http://stoppels.blog/posts/compile-time-primes#a-compile-tim...
808.
▲
by
stabbles
9y ago
A little bit late to the party here, but the number of allocations is really just 0 bytes. It shows 128 bytes because the benchmark is creating new references to A, B and C. To correct this use either interpolation with $A, $B and $C or ini
809.
▲
by
stabbles
9y ago
In Julia this would read using broadcasting: X = ones(Int, 1_000_000_000) Y = ones(Int, 1_000_000_000) # explicit dot notation X .+= 2 .* Y # or with a macro @. X += 2 * Y The + and * do not allocate, the oper
810.
▲
by
stabbles
9y ago
Is this really his official website?
More ›