A more privacy-friendly blog - <AUTHOR> https://vincent.bernat.im/en/blog/2018-more-privacy-blog <comment><USER2> Awesome! I dumped Disqus and Google Analytics earlier this year, too. I hadn't thought about Google Fonts, so I'll dump that soon, too.

Since you are using CloudFront, I highly recommend [http://s3stat.com](http://s3stat.com) for analytics. It grabs CloudFront's (or S3's) server access logs and visualizes them.

For search, I like this method Mat Hayward uses for Jekyll: [https://github.com/mathaywarduk/jekyll- search](https://github.com/mathaywarduk/jekyll-search) Dump the site contents out into a JSON file with the titles and links accessible, crawl through the JSON file with javascript whenever someone runs a search, then display the results. I know you use Hyde instead of Jekyll, but you can port over the general idea.

<comment><USER3> There's one small downside to using your own font. The Google Font is very likely already cached in the browser and won't need to load from anywhere remote.

An even better solution might be to just not specify a specific font unless you really, really need one.

<comment><USER4> Use a system font stack. Both macOS and Windows come with good font choices, and Linux … is Linux, more often than not, users are not even aware of typography or why it matters.

<comment><USER5> That's pretty dismissive of Linux users. Just because someone uses Linux, doesn't mean that person doesn't care about design.

<comment><USER4> Of course. It's just my subjective experience that most don't. It's to the point most don't know what ligatures and stylistic sets are. Most Linux software lacks basic OpenType features support.

<comment><USER6> > It's to the point most don't know what ligatures and stylistic sets are.

As if the majority of Windows and Mac OS users would know that.

<comment><USER7> Since a noticeable at least portion of Mac OS users have some artistic vein one would argue for Mac OS users. For Windows my personal opinion is the average user has no idea. I think for Linux/BSD etc there is a part of users that know or have some idea but don't care enough personally. I comment from experience -- not aware of any study that looks for correlation :D

</comment></comment></comment></comment></comment></comment></comment><comment><USER8> > As it is unlikely that more than three people will use the search engine in > a year, this seems a good idea to not spend too much time on this non- > essential feature.

I disagree. When I want to remember something, I blog about it. When I implemented a search feature on my site, it was a godsend, and wondered why I had overlooked it for so long. Finding something I had blogged about years ago wasn't a pain anymore, since a box is right there.

<comment><USER9> > _I disagree. When I want to remember something, I blog about it. When I > implemented a search feature on my site, it was a godsend, and wondered why > I had overlooked it for so long. Finding something I had blogged about years > ago wasn 't a pain anymore, since a box is right there._

You can use Google or whatever to search your blog, or search local files with your posts or whatever.

In any case, and especially since you're not adding the search feature on your blog for the blog's visitors, but for you, it sounds totally redundant.

<comment><USER10> >You can use Google

<whoosh>

<comment><USER9> Whoosh what? This subthread is not about "more privacy" anymore, it's about searching your own blog -- and since you put it out there, I'd assume you already have it indexed by Google (unless your visitors are handpicked and sent the URL).

</comment></comment></comment></comment><comment><USER11> For analytics you can try log analyzers like Webalizer and Goaccess. I use the former and I kinda dislike it, but I at least don't not like it as much as Goaccess. All I look at is just the list of referrers most of the time anyways, to see if there are any backlinks.

WRT comments and fonts, you can just get rid of both for good. Not imposing your fonts on the reader is almost always good, and you save on the bandwidth. And when it comes to comments, I prefer to host my content only on my website. People do e-mail, and asking them to email if they want to discuss with me is an incredibly effective spam filter.

WRT big media like videos and sound files, and bigger images, I think it's better to just link to them. Software like mpv, mplayer, VLC, &c are capable of streaming, so it becomes a matter of copying the link and "curl <link> | mpv -" or adding a mailcap entry.

Another thing I can add is to use shared hosting. It's easier to maintain and safer if you trust your host (I use NearlyFreeSpeech.NET, and if this mention counts as an ad, let that be; I really like them). I just generate my static blog and rsync it over ssh. rsync the logs and run webalizer on them every now and then. As simple as it gets.

</comment><comment><USER12> If you are already self-hosting services, why not self-host your search too? Searx is a very good service that aggregates results from any number of search engines, which is collects by stripping out any/all identifiable info from the requests it submits. You (not DDG, etc) can explicitly disable logging and be confident that your system is not preserving logs, instead of trusting Yet Another 3rd Party to do the right thing.

<comment><AUTHOR> One reason I prefer to use DDG is also to promote them. I started using DDG when I saw other people using it. The other reason is I also try to limit the number of services that I have to maintain.

</comment></comment><comment><USER13> Very helpful. I've hosted a few videos using cloudfront but there were lots of little gotchas with setting up both the hosting and the player. I wish I had found the linked to guide earlier: [https://vincent.bernat.im/en/blog/2018-self-hosted- videos](https://vincent.bernat.im/en/blog/2018-self-hosted-videos)

<comment><USER14> I've wanted something like this for so long but never knew where to start. Thanks!

</comment></comment><comment><USER15> There has to be a simpler, privacy focused way to figure out pageviews, right? As long as I don't know _who_ looked at my site, I should be able to find out _how many_.

Similar thing goes for "how many people clicked this button"

Or am I way off here....

<comment><USER16> You can self-host a free analytics solution like Matomo (formerly called Piwik) [1] and choose whether you're fine analyzing web server logs alone or want to track finer details by injecting JavaScript (provided in the solution) on your pages.

[1]: [https://matomo.org/](https://matomo.org/)

</comment></comment><comment><USER17> Is there any open source browser session recording tool? With recording features like the one in Fullstory or Hotjar.

So one can record what people do at one's website, and see what UX problems they run into, and if something makes them feel bored and leave. Without sending their browser session to a 3rd party. (Fortunately the one I'm using right now is able to exclude parts of the recording, client side. E.g. `input` fields. But still would feel better to not send anything to a 3rd party)

</comment><comment><USER18> If you have RSS on your site you can use the search script I made for my static web site/blog: [https://www.webtigerteam.com/websearch/](https://www.webtigerteam.com/websearch/) Earlier discussion: [https://news.ycombinator.com/item?id=14717182](https://news.ycombinator.com/item?id=14717182)

</comment><comment><USER19> Way back when we all installed software that analyzed Apache (et al) logs, before Google came in and killed it with their GA package. Why not a return to this classic style?

I remember messing with a module in webmin (i think?) that did this, and watching traffic come in and have it show up in the reporting tool. Was pretty cool considering the whole thing was self-contained

edit: I'm thinking of AWStats

<comment><USER20> Urchin [1] was a popular one. It was bought and killed by Google.

[1] [https://en.wikipedia.org/wiki/Urchin_(software)](https://en.wikipedia.org/wiki/Urchin_\(software\))

<comment><USER19> I think we are thinking of something different. AWStats?

</comment></comment></comment><comment><USER21> Thanks to your post, I learnt about Content-Security-Policy in HTTP headers. I thought, that's awesome, let me add a tight CSP to my site ([https://scripter.co](https://scripter.co)) as I don't load any content from outside and the only thing going out are Webmentions sending requests... and then I realize that I use #mathjax on some pages..

MathJax requires me to add 'unsafe-inline' and 'unsafe-eval' to script-src, and 'unsafe-inline' style-src. So my overall CSP becomes quite weak :(

Anyone would have an idea how to implement CSP without those, _and_ uses MathJax?

Thanks.

<comment><USER21> I fixed this finally, thanks to Github user dpvc and his suggested way of writing MathJax config: [https://github.com/mathjax/MathJax/issues/1988#issuecomment-...](https://github.com/mathjax/MathJax/issues/1988#issuecomment-384978927).

</comment></comment><comment><USER22> While Google Fonts may be covered by the generic Google Privacy Policy (haven't verified this myself), it is technically unable to track users very well due to caching for a day at a time and serving from a cookieless domain. If a user visited any other site using the same font that day, visiting your site won't result in a request to Google. [https://developers.google.com/fonts/faq#what_does_using_the_...](https://developers.google.com/fonts/faq#what_does_using_the_google_fonts_api_mean_for_the_privacy_of_my_users)

</comment><comment><USER15> _I opted for a simpler solution: no analytics. It also enables me to think that my blog attracts thousands of visitors every day._

I lol'd

<comment><USER23> But now they don't get to see the huge amount of traffic sent from Hacker News :-(

<comment> loup-vaillant You can still `grep | line` the logs. There are also tools that do more precise analysis.

</comment></comment></comment><comment><USER24> I work on Listed as part of Standard Notes, which is a privacy focused blogging platform focused on authors, and allows authors to receive tips, sell content, and use custom CSS.

More here: [https://listed.standardnotes.org](https://listed.standardnotes.org)

</comment><comment><USER25> This is neat. I use disqus on my blog and had never heard of Isso. I'll have to check it out.

<comment><USER17> There's also Talkyard, which is like Disqus, and open-source, no ads, no tracking. Serverless hosting. Google, Facebook etc login.

[https://www.talkyard.io/blog-comments](https://www.talkyard.io/blog-comments) (I'm developing it)

<comment><USER26> Your pricing being cheaper for people in developing countries is interesting. I quite like the idea behind that. A few Euros is practically nothing for me but for some people it's a week's worth of food.

<comment><USER17> Ok :- ) It's related to the vision & goals: helping people to find ideas & solutions to problems in society. And then it needs to be affordable for people in developing countries too (because maybe that's where there're most problems to solve?).

</comment></comment></comment></comment><comment><USER27> I would have book-marked your page to reread it later (I've been working on a new blog design). Unfortunately, something on your page is blocking pinboard.in.

<comment><AUTHOR> I believe this is the CSP. You can confirm that in the Javascript console. Extensions should be able to work around that. Bookmarklet are bound by the CSP and the major browsers don't want to fix that ([https://bugzilla.mozilla.org/show_bug.cgi?id=866522](https://bugzilla.mozilla.org/show_bug.cgi?id=866522), [https://bugs.chromium.org/p/chromium/issues/detail?id=233903](https://bugs.chromium.org/p/chromium/issues/detail?id=233903)).

</comment></comment><comment><USER28> I built a hosted comment service powered by Isso - [https://comment.sh](https://comment.sh) :)

<comment><USER17> What's your goals & plans with `comment.sh`? Right now the website says "Free Signup" — I'm thinking either the plan is to start charging money later, or, if it stays free, then there is some altruistic / ideological reason you're doing this project & will continue long term ?

(There's no About page so I couldn't find out :- ))

</comment></comment><comment><USER29> Thanks for posting this, I've been meaning to make similar transitions with my site.</comment>


AMD's Future in Servers: New 7000-Series CPUs Launched and EPYC Analysis - <AUTHOR> http://www.anandtech.com/show/11551/amds-future-in-servers-new-7000-series-cpus-launched-and-epyc-analysis <comment><USER4> 4 dies per package is a pretty interesting way of doing things - <USER2> helps yields immensely, but I can't imagine it does anything good for intra- processor latency. 142 ns to ping a thread on a different CCX within a die isn't too horrible, but I really want to know what sort of penalty you'll have from going to a different die within a package.

<comment><USER5> I think it's less about yield, than it is about amortizing a large R&D budget across more chips. Keep in mind that they are competing with Intel who ships huge volumes and is using this generations profit to fund the next generation fabs.

So AMD pours everything into a single die and manages to hit the desktop (Ryzen with 1 die), workstation (thread ripper with 2 dies), and server (Epyc with 4 dies). All with a single wafer of silicon, and as a bonus the memory bandwidth, max memory capacity, and total number of cores scales to fit all 3 markets.

Pretty crafty. This is far from new of course, various Power CPUs, Intel cpus as far back as the pentium pro, and of course the previous generation Xeons.

Intel's strategy has been one die for most of their low end/low power chips (max 2 core/4T) and a larger die for their desktop (max 4c/8t) that use the same socket (LGA1151).

Then Intel targets HEDT (High end desktop) and server with the same chip, same die, same socket, just marketing to differentiate the x-servies chips and the regular single/dual socket chips that share chipsets, sockets, and a lga2011 socket.

AMD seems to have scared Intel pretty bad. They have held off on the skylake xeons, only shipping them to cloud providers while they wait for the AMD release before releasing skylake xeons to the masses.

I'm glad to say AMD performance seems pretty good, SpecINT (using GCC) is around 50% faster than the similar Intel chip and SpecFP is even better. Seems fair unless you use the Intel compiler to compile all your binaries anyways. In fact the fastest AMD + gcc-6.2 is faster at SpecFP than the fastest Intel + Intel's compiler (1330 vs 1090 respectively).

<comment><USER6> Well, the Ryzen cores don't have 128 PCIe links, do they?

<comment><USER7> Is there any Intel core with 128 PCIe links then? I'm not aware of any. Iirc Intel is at 40 lanes / socket, which is more like 10 per core rather than 128.

</comment></comment></comment></comment><comment><USER8> For anyone looking for info about the socket:

* Epyc uses socket SP3 [https://en.wikipedia.org/wiki/Socket_SP3](https://en.wikipedia.org/wiki/Socket_SP3)

* Threadripper uses socket TR4 [https://en.wikipedia.org/wiki/Socket_TR4](https://en.wikipedia.org/wiki/Socket_TR4)

* Sockets SP3 and TR4 have the same number of pins (4094 pins) and they have the same cooler bracket mount (see [https://www.overclock3d.net/news/cases_cooling/noctua_showca...](https://www.overclock3d.net/news/cases_cooling/noctua_showcase_epyc_threadripper_ready_tr4_sp3_ready_cpu_coolers/1) )

* However they are still two separate sockets so you shouldn't expect to be able to use Epyc on TR4 or Threadripper on SP3

<comment><USER9> It is probably to differentiate motherboards. You don't want the consumer to plug in Epyc into Threadripper's mobo and complain that there is not enough PCI-E lanes or memory channels.

</comment></comment><comment><USER10> I would really love it if there was a benchmark around running VMs and containers for something like this. Our dev/test system is all docker containers so that is what we would care about.

I guess it would be hard as there are to many ways to scale out what you run - how many VMs, how many containers, what are you running in them? It would be an interesting benchmark matrix to sort for.

It would be interesting just to see how many containers you could start, run lighttpd and each server a static web page? Maybe 1/2 with the page and 1/2 with an application that builds the page? Who knows...to many variables.

I think we will just by a system when we can and try our workload on it. Oh, well.

<comment><USER11> I don't think running processes inside a container will be any more interesting for benchmarking than just running the processes normally. What overhead does a container add? A little indirection in syscalls? I would imagine the number of instructions involved in that are beyond trivial for serving a page, so I can't see how benchmarking running containers would be different than just benchmarking running your processes.

VMs - now with processor virtualisation technology I'm sure the different processor architectures do make an interesting difference there.

<comment><USER10> In some of our scaling test where each container had an IP connecting out to a remote system we ran in to a ton of issues at scale that we did not see running the same number of processes on the bare metal. The overhead of the namespace can add up.

<comment><USER12> This is due to the what the container orchestratior uses to route traffic, check out project calico for low overhead networking.

<comment><USER10> The issue had everything to do with how Linux handles networking when you have 1000 container interfaces on a single system. Tweaking net.ipv4.neigh.default.gc* solved most of the issues.

I am familiar with Calico and it would not have solved it.

</comment></comment></comment></comment></comment><comment><USER13> Soooo the Linux kernel now compiles in 15.6 seconds. Jeebus I feel old...

<comment><USER14> I was about to point out that it compiled in 4.8 seconds back in 2002 [http://es.tldp.org/Presentaciones/200211hispalinux/blanchard...](http://es.tldp.org/Presentaciones/200211hispalinux/blanchard/talk_2.html) But then I remembered that it was only 4 million lines of code back then (v2.5.x) and now it's 18 million! [https://www.linuxcounter.net/statistics/kernel](https://www.linuxcounter.net/statistics/kernel) (Edit: fixed second link)

<comment><USER15> There used to be a long running joke (I think perhaps Linus even coined it?) that the kernel codebase grew about as fast as CPU performance improved. I guess that died around the time AMD released their dual core CPUs..

<comment><USER16> It seems reasonable, considering anyone working on it enough to need to recompile would have a minimum change time correlated with compilation time. (Incremental compilation aside)

<comment><USER17> Going to get a cup of coffee takes the same amount of time as it did 15 years ago, so devs still need a compile time which is roughly equivalent. 15 seconds would be much too fast, for example.

</comment></comment></comment></comment></comment><comment><USER18> Baidu and Microsoft will be customers:

[https://www.bloomberg.com/news/articles/2017-06-20/amd- serve...](https://www.bloomberg.com/news/articles/2017-06-20/amd-server-chip- revival-effort-enlists-some-big-friends)

<comment><USER19> HP and Dell announced their new line of Servers based on EPYC. According to the keynote, thet were working with AMD since day 1 of EPYC development.

</comment></comment><comment><AUTHOR> 1 socket 16 / 32 @ 2.9GHz max for $700+... it looks like 16 core Threadripper with reasonable frequencies for less then $999 looks in reach...

<comment><USER20> So how will threadripper different from the single socket guy presented here?

<comment><USER21> Threadripper is a 2-chip module rather than 4, so will have half the L3 cache.

Threadripper has half the memory channels and half the PCIe lanes.

EPYC is available with up to twice the cores.

The main advantage I see for Threadripper is that at 16 cores EPYC will have half the cores disabled, so for problems that fit in L2 you lose some performance from the reduced L2 sharing. That and it should be priced better than server chips, with I suspect the 12 - 14 core being the sweet spot.

Based on leaks I think Threadripper might boost a few 100 MHz higher, with base clock up to 3.6GHz.

<comment><USER22> I would not be surprised if there will be no 14 core part. None of the Zen based CPU's so far have a uneven CCX configuration but 14 cores would require that.

<comment><USER23> The Ryzen 5 1600 and 1600x have two CCX modules with 3 cores each (one core disabled on each CCX). So it wouldn't be impossible for AMD to make a 14 core part.

<comment><USER22> Yes, but what I meant is uneven CCX. The 4 core parts have 2+2, the 6 core parts have 3+3, the 8 core parts have 4+4. There is no uneven CCX combination like 2+4 for example.

If this applies to multi die solutions like Threadripper, there will be no 10 and 14 core parts as they would require uneven CCX combinations.

If the Epyc lineup is an indication this might be true. Especially since there is no 12 core part for Epyc. Since it has 4 dies you could produce 12 cores by using only 3 cores of each die, but this would require uneven CCX (1+2 or 0+3).

<comment><USER24> I suspect that uneven configurations aren't allowed. IIRC, in the die each core has a direct link to the same core on the other CCX, a direct link to the same core on the other dies in the MCM, and a direct link to the same core on the other chip if in a 2P motherboard.

IOW core #13 is the 5th core in the second die, aka the 1st core in the second CCX on the second die. So it would have a direct link to the 1st core in the first CCX on the second die, as well as a link to the 5th core in the other 3 dies as well as a link to the 13th core on the second chip if in 2P.

So it seems quite likely that all 16 CCX's in a 2P server must have the same number of cores.

</comment></comment></comment></comment></comment></comment></comment><comment><USER25> intel had a monopoly on high-end chipsets for _far_ too long. I'm glad, there is some competition.

</comment><comment><USER26> Those TDPs look pretty high, what are vendors willing to put into 1U high 0.5U wide style servers with 2 sockets these days? Last I looked I seem to recall it was around up to 145W.

<comment><AUTHOR> AMD EPYC 7601 Dual Socket Early Power Consumption Observations

[https://news.ycombinator.com/item?id=14598660](https://news.ycombinator.com/item?id=14598660)

[https://www.servethehome.com/amd-epyc-7601-dual-socket- early...](https://www.servethehome.com/amd-epyc-7601-dual-socket-early-power- consumption-observations/)

<comment><USER27> > Running an AVX2 workload we were expecting much higher power consumption but > at under 500w for 128 threads, this is excellent.

eish

<comment><USER28> Granted the AVX2 performance of the Zen processors is intentionally crippled. It's more of a software compatibility implementation than actual performance boost.

<comment><USER29> Citation?

<comment><USER28> Agner on microarchitecture [1], page 213, another mention as a bottleneck on page 216:

 _The Ryzen supports the AVX2 instruction set. 256-bit AVX and AVX2 instructions are split into two µops that do 128 bits each._

AVX2 increased register width from 128-bit (AVX) to 256-bit, yet Ryzen cores can only process them 128-bit at a time. There is more to AVX2 than just width but that means in comparison to Intel processors, which can do the full 256-bit in a µop, the Ryzen throughput will suffer in tests that heavily emphasize AVX2 instructions (think video encoding).

1: [http://www.agner.org/optimize/microarchitecture.pdf](http://www.agner.org/optimize/microarchitecture.pdf)

<comment><USER29> Thanks!

</comment></comment></comment></comment></comment></comment></comment><comment><USER30> A bit off topic, but does anyone knows if AI ( aka modern neural networks) plays a role in cpu design nowadays ?

<comment><USER31> Probably not. Do you use AI to write code?

<comment><USER32> A compiler does a lot of AIish things in turning my C code into a sequence of instructions. Much more classical AI than machine learning but still within the AI umbrella.

<comment><USER31> I was referring to the RTL-based IP that goes into each subsystem of the CPU, hence the analogy to code. You're talking about compiler instruction scheduling, a lot of which are a bunch of non-AI algorithms. If I'm missing something, I would appreciate the references to the functionality you're referring to.

</comment></comment></comment></comment><comment><USER33> Why does AMD compare their single socket CPUs to Intels E5-2XXX line? Intel has E5-1XXX single socket CPUs.

<comment><USER14> I think the idea is that single-socket EPYC CPUs beat many Intel dual- processor setups. If you break it down by sales numbers, a single EPYC might beat the most popular dual-Intel platforms. [http://images.anandtech.com/doci/11551/epyc_tech_day_first_s...](http://images.anandtech.com/doci/11551/epyc_tech_day_first_session_for_press_and_analysts_06_19_2017-page-022.jpg)

<comment><USER33> Oh wow! I totally overlooked the 2x E5-2XXX part. That makes much more sense now and is totally awesome.

</comment></comment></comment><comment><USER34> I didn't see any info on the cpu cache architecture which governs performance for many applications now.

Anybody have any info on things like L0 to L2 size, type, latencies, etc?

<comment><USER35> Our original Zen Microarchitecture deep dive has all the info.

[http://www.anandtech.com/show/11170/the-amd-zen-and- ryzen-7-...](http://www.anandtech.com/show/11170/the-amd-zen-and- ryzen-7-review-a-deep-dive-on-1800x-1700x-and-1700)

<comment><USER34> This gives a really bad picture of AMDs cache performance. The all important L1 and L3 are much slower than Intel. No bueno.

[https://www.techpowerup.com/img/17-03-06/7ca3a1705392.jpg](https://www.techpowerup.com/img/17-03-06/7ca3a1705392.jpg)

<comment><USER36> You have to be careful when comparing latencies as the numbers can be completely meaningless depending on workload.

Also, note that the numbers have changed significantly for Zen since its original launch due to updates from AMD/Manufacturers, so many of the numbers you see in older reviews are no longer accurate.

If you read reviews of the new Intel processor today, you'll see latency numbers have increased for Intel with their new architecture:

[https://www.pcper.com/reviews/Processors/Intel- Core-i9-7900X...](https://www.pcper.com/reviews/Processors/Intel- Core-i9-7900X-10-core-Skylake-X-Processor-Review/Thread-Thread-Latency-and-)

In the end, workload-based performance metrics tend to be far more meaningful than synthetic benchmarks or simplistic latency measurements.

</comment></comment></comment></comment><comment><USER37> Related: [https://news.ycombinator.com/item?id=14598660](https://news.ycombinator.com/item?id=14598660)

</comment><comment><USER38> What's the SSEs and AVXs performance like on Ryzen/EPYC compared to intel?

<comment><USER39> SSE performance is comparable, so is 128-bit AVX. 256-bit AVX is in theory half as fast.

Despite this, apparently Ryzen beats Kaby Labe on SPECfp, so theorethical max throughput is only part of the story. It does not help that Intel needs to heavily reduce their boost speeds when using the full AVX unit.

<comment><USER40> It's not actually half as fast, because these chips run a AVX at the full clock speed, rather than down clocking as Intel does.

<comment><USER38> So, any benchmarks regarding SSE and AVX out there yet?

<comment><USER41> For the new AMD releases there's none yet, but for Ryzen 7 Phoronix did one comparison for code compiled with -mavx2 and Ryzen did really poorly. The other benchmarks which use more integer math or relies heavily in multithreading puts AMD in an advantage. The post was in 18 May 2017 and AMD may have released some microcode updates that nullifies the results.

The review: [http://www.phoronix.com/scan.php?page=article&item=ryzen- kab...](http://www.phoronix.com/scan.php?page=article&item=ryzen-kabylake- may&num=6)

</comment></comment></comment></comment></comment><comment><USER31> Wow! AMD EPYC + Xilinx FPGA!

<comment><USER42> I'm... actually shock that somebody care about Xilinx.

I had to do Xilinx in my CE classes. It was terrible software, we joked that the CE and EE people code that software. Crashed all the time, made me so paranoid that to this day I would often ctrl+s every few minutes just in case my IDE crashes.

<comment><USER43> FWIW new Xilinx silicon is programmed by a new software suite, Vivado - <USER3> is much better than the terrible ISE you probably had to use in your class.

</comment></comment></comment><comment><USER44> While I'm excited to see AMD's offering, as a scientific-HPC user I can't help but wonder how much marketshare AMD will be able to gain without more information on supporting software - specifically good compilers + math libraries (cf. Intel compilers + MKL).

Strangely, I've not seen much on HN, or elsewhere, make mention of AMD's software support. Is this because it doesn't exist, or because compilers are less "sexy" than shiny new hardware?

<comment><USER45> > While I'm excited to see AMD's offering, as a scientific-HPC user I can't > help but wonder how much marketshare AMD will be able to gain without more > information on supporting software - specifically good compilers + math > libraries (cf. Intel compilers + MKL).

My take is that AMD's newest offering will be very well received by everyone who has a relatively tight budget but needs a small supercomputer on the desktop. This means data analysts and people doing all kinds of structural analysis work. As some optimization algorithms fit the definition of embarrassingly parallel, the expected turn-around time of anyone doing that sort of work will benefit greatly from the extra speed, bandwidth and core count of AMD's Ryzen/Threadripper/Epyc line.

</comment></comment><comment><USER46> >In this case, an EPYC 7281 in single socket mode is listed as having +63% performance (in SPECint) over a dual socket E5-2609v4 system.

So, quad-CPU is faster than dual-CPU? Not surprising.

<comment><USER47> I guess the point is AMD offers significantly more bang per buck (and socket) at similar prices.

<comment><USER48> The per-socket performance might be a nice "marketing hack", since a lot of big-iron software is sold and licensed as "per-socket".

IIRC, Windows Server is sold per-core however. So lots of cores may rise the total-cost of ownership in the case of Windows Server.

<comment><USER47> Good thing most servers use Linux and other open source software. I actually read something recently that Microsoft almost got in trouble during the antitrust days for trying to sell Windows licenses "per processor." They seem to be doing exactly that. I guess they've gotten bolder since the governments stopped monitoring them closely.

<comment> Tuna-Fish The rules are different depending on whether you have a dominant market position or not. Microsoft clearly does not have a dominant market position on server hardware, so they can use "creative" licensing there.</comment></comment></comment></comment></comment>


Avoiding Reflection (And Such) in Go - <AUTHOR> http://www.jerf.org/iri/post/2945 <comment><USER2> Maybe I am misreading, but the Little Types section I think recommends an ugly habit, especially for libraries. When calling this "func Set(ID, Width, Height, Color)", assuming I acquire integers through user input, this means my code would then look like - extLibrary.Set(extLibrary.ID(id), extLibrary.Width(width), extLibrary.Height(height), extLibrary.Color(color)), which frankly is a nightmare. I'd expect the function to take 4 integers, then convert internally if needed.

Further, it makes Godoc more confusing, since now I have to search around to figure out what each of these custom types is.

<comment><USER3> As a general rule, convert incoming input (user or otherwise) to the correct type as quickly as possible, and convert it to the outgoing type as late as possible. When programming in this style, for you to reach the point in the code where the Set call is being made and for you to still have 4 "int"s almost certainly means you should have converted them earlier. Generally you've got a validation phase somewhere, which is where this should be converted, which means that your "Width" isn't just "what happended to be in the input" but is a "validated Width" as well. Since it floats on the validation code it's often not even 1 extra line of code, just another token that I mentally model as sort of "sealing" the fact that this is a good value.

This rule goes _way_ beyond "tiny types"; for instance you will drive yourself insane in the web world if you don't do this, with double-decodings and double-encodings quite challenging to prevent with any other policy. [1]

"Further, it makes Godoc more confusing, since now I have to search around to figure out what each of these custom types is."

Absolutely yes. In any language where this is possible and easy, I do wish the auto-doc systems either automatically, or with some metadata (preferably a label on the type somehow), would make it clear when something is just a one- layer wrapper around a simple type in all the places where it appears in the docs, without having to click through. I consider it worth the cost, but this is definitely an entry on the cost column that is accidental, not essential. This is especially true when the base type is numeric, which means that Go will let you pass in a literal number in the source code, but that is not always your first expectation.

[1]: In a statically-typed language you can also play games with having the type label what "layer" of decoding the value is currently in, which works but gets more tedious. This is theoretically possible in a dynamic language, but goes against the grain, since generally people program with just 'strings' in those languages.

<comment><USER4> Hi, I enjoyed your article.

You have some good points about tiny types, but if you read through the code in the Go standard library, you won't find this style applied in very many cases. Typically, only if one wishes to attach a method to a built-in.

As another poster rightly pointed out, it complicates the documentation quite a bit, and I think a lot of Go programmers would consider it pointless abstraction.

        // NewBox creates a new Box. It returns an error if length
        // or width are less than or equal to zero.
        func NewBox(length, width float64) (Box, error) {
            ...
        }

Consider the simplicitly of NewBox. We may omit a Length and Width type, and any validation of these by stating the expectations of the inputs in the documentation. So, the API is dramatically simpler. The expectation is that the programmer will not pass invalid arguments to NewBox, by way of common sense or reading the documentation. Programmers who pass in positive numeric literals may even opt to ignore the error returned, since the documentation states the the only reason an error would be returned is if the input parameters were <=0.

Go puts a big emphasis on documentation, and this often compensates for lack of power in its type system.

<comment><USER5> To me the perfect example of when you want to use tiny-types is when dealing with values in different units, say, temperatures in Celsius and F. They're both floats, but mean very different things. The extra typecast you have to do before calling a function with a float is a good sanity check.

</comment></comment></comment></comment><comment><AUTHOR> This is an excellent, well researched and well written article, that shows a lot of great things can be programmed in Go, despite the apparent simplicity of the language, while staying honest about the limits of the language for some use cases.

<comment><USER6> "despite the apparent simplicity of the language"

Simplicity is not a weakness or failing of a programming language, it is something that every language designer should strive for. To imply otherwise is to say (non-essential) complexity is a good thing.

<comment><USER7> I think the contrast drawn isn't with a simple language, but with a too-simple one. As Einstein was paraphrased, "Everything should be made as simple as possible, but no simpler."

<comment><USER8> Agreed. I feel like I'm never quite sure where Go falls on this line.

<comment><USER6> Where Go falls on this line depends on your conception of a programming language. If you look at a language as static definition that doesn't change with time, it would be easy to see Go as too simple. But looking at a language as an organic thing that grows over time, I think Go's simplicity and resistance to change generally gets it about right. To many modern languages suffer a complexity problem from years of accrued features.

</comment></comment></comment></comment></comment><comment><USER9> I'm going to get stabbed in a dark alleyway for this, but I would argue that most Go projects don't benefit from being perfectly go-ish.

It's a small, simple, language that is terrifically pragmatic. Write code that's clear, self-documenting, and works. Then go back and fix up performance, convention, and style, as needed.

I wonder how many thousands of hours has been spent talking back and forth over an ultimately trivial part of Go.

......

Solid articlie though. As someone who writes a lot of Go, is sick of hearing about Go, I enjoyed it.

</comment><comment><USER10> Excellent explanation of composition over inheritance in Go. As someone new to Go, this was invaluable.

</comment><comment><USER11> > Because composition doesn't intermingle objects the way inheritance does, it > allows much more interesting "chains" of objects to be created that extend > each other, without the complexity exploding.

Go's (really Plan 9 C's) composition support does "intermingle" methods, which has pretty much the same effect as intermingling fields. To see this, note that Go needs rules about who wins if methods for an outer object and an inner object have the same name (and they have to consider diamonds, which you can have with composition!)

> So, "Go doesn't have generics" is only half true.

I know this is going to be me annoying about terminology, but I really disagree. :) Go has _polymorphism_. It doesn't have _generics_ , at all. "Generics" has a specific meaning: the ability to take types as parameters.

> It can be profitably argued that the primary virtue of "generics" is generic > algorithms rather than generic types.

I don't agree. Generic types are necessary, because you often can't express generic algorithms naturally without generic types. Just as an example of where I needed generics in my work most recently, I wrote a polygon clipper over the past couple of weeks that has special fast paths when it clips rectangles and falls back to Sutherland-Hodgman clipping for complex polygons. This was natural to express by making the clipping result generic over the type of polygon (rect or edge list). I could maybe have done it in Go by using the "container-as-interface" trick that the sort package uses, but that would introduce a lot of boilerplate.

There's also the issue that all these interfaces make it awfully hard for the optimizer to produce as good code as it would if you actually had generics. Unless you inline everything away (in which case SROA and constant propagation can mostly get you there), you'd need a nontrivial interprocedural analysis. Performance issues around generic programming tend to have outsized effects, because functions that tend to be generic are precisely those functions that tend to be called a lot (because they're generic!) and shoot to the top of the profile.

> As a side note, if Go ever does grow full generics, I expect it to do so by > extending the half it has, rather than adding a new concept of generics on > the side. It's easy to imagine a generic BalancedBinaryTree that requires > its nodes to conform to a LessThan interface.

This I agree on entirely. Note that this is pretty much exactly what Swift did :)

> If you have a constrained set of messages, for instance, you can use the > type system to more carefully declare them as coming from a particular set > of types, not just interface{}.

But you lose half of the point of sum types, in that the compiler can check exhaustiveness for you. It's worse, because since you're doing a Go type switch, you can match against cases that aren't even in the sum type and the compiler won't complain! It's also an awful lot of boilerplate to create a half-approximation-of-a-sum-type, meaning that the ergonomics favor people not using it. interface{} is just plain easier to use compared to the sum type pattern, which is why it gets so much use.

> Go still manages to cover so much with its meager feature set. There's a > lesson here for language nerds. I don't fully know what it is yet, but I'm > working on it.

I think the lesson is "people will figure out design patterns to approximate things that your language doesn't support". This is no surprise: people write OO systems in the C preprocessor. But I think it would be a mistake to conclude "omit useful features from the language if there's any way people can possibly approximate them". This was the approach that Java famously took, and people rightfully soured on the extreme emphasis on "design patterns". And what you've described in this post is nothing more than a set of design patterns. Design patterns have their place and are very useful, but they're also the sincerest form of feature request.

<comment><USER3> "Go's (really Plan 9 C's) composition support does "intermingle" methods,"

Just for clarity, what I mean is that when those methods are called, the get the specialized type, as opposed to multiple inheritance where the two base classes can end up calling into each other in a mutually-derived child because the methods still receive an object of the full derived type. You certainly can end up with conflicting method names. I have to admit I don't dock Go much on that, because as we all know, there are two hard problems in computer science, caching and naming things.

"I don't agree. Generic types are necessary, because you often can't express generic algorithms naturally without generic types."

I'm pretty sure I basically said that latter part.

"...polygon clipper..."

I didn't repeat it in this post, but in other places I actively volunteer my belief that anything that involves "doing lots of math" (in the full sense of the term, rather than "a lot of arithmetic") is a bad place to use Go. But I'd observe that every time someone reaches for a reason why they really badly needed generics, it always seems to involve math. I expect this means something.

(It's OK, you don't need to go searching for one that doesn't. I fully believe they exist, and I occasionally encounter them.)

"I think the lesson is "people will figure out design patterns to approximate things that your language doesn't support"... And what you've described in this post is nothing more than a set of design patterns."

I'm not sure that's supported by the text very well. The only thing in there that probably qualifies as a "design pattern" is the sum type approximation; everything else is too small. The only "design pattern" I find myself frequently reusing in Go is external API + "sum type" protocol + goroutine server receiving that protocol. (The boilerplate in that case is the external API implementation, and the use of a channel to return a value; the message types and the server loop themselves are generally not redundant.)

I cut this off the end, but maybe I shouldn't. More what I'm going for here is that I've got a simple language that does a good job with X% of the problems of the world, and over there, I've got a language with a laundry list of complicated features that are much harder to understand and work with, and it goes a good job with Y% of the problems of the world, and I think there's a lot of people who master one of those hard languages and come away thinking X is roughly 5% and Y is roughly 100%. But especially from an engineering-in-a- large-team perspective, it's worth being reminded that that's a cynical estimate, not a reasonable one. It varies from place to place, of course, but X can easily be 80% and Y merely 95%, and might want to try to be sure that you're only paying the price for Y when you're in that other 15%.

I'm curious whether it's possible to build a better language that covers more of the space between Go & Rust, but with a more Go-like cognitive footprint, and I'd like to poke interested people to consider if there might be an answer to that. Again, especially from a programming-in-a-large-group perspective, I still don't really love _any_ of my options. I realize that from your POV (no sarcasm) Go seems like a terrible downgrade, but from my POV it has been an immense upgrade from a world of dynamic scripting languages, in terms of what I can guarantee and provide in my APIs without writing in a language that virtually nobody understands. There's no way I could put Rust or Haskell or anything else that strong and _expensive_ into where I'm putting Go. Go's in a sweet spot that happens to be poorly occupied right now, and I would _love nothing more_ than for someone to improve on it. This is especially true because other than perhaps getting real generics added on later (which I still think is at least conceivable) there's a lot of other places where Go is already very near its own local optima; it's not going to improve much, I think. It will be pretty much what it is.

<comment><USER12> It seems like a lot of dynamically typed language programmers are catching on to Go and it's the best thing they've ever known. Generics are just not that hard. They are not the difference between a comprehensible codebase and an incomprehensible one. The only reason they're not in the language along with higher-order list manipulation among other things is because of the idiosyncrasies of Go's creator.

<comment><USER3> Bear in mind that while my job is in dynamically-typed languages, I'm fluent in Haskell, and have done non-trivial work in it. Go wouldn't be as large an upgrade for me if Haskell hadn't taught me so thoroughly what static type systems can do. I'm not just "a dynamically-typed programmer who just discovered Go and thinks its the best thing since sliced bread" or something.

<comment><USER13> I'm very thankful for your work in figuring out how to make more static guarantees in Go code.

</comment></comment></comment></comment></comment><comment><USER14> You Go people really likes the pain.</comment>


Calling Y Combinator - need for YC in other countries - <AUTHOR> http://startupping.blogspot.com/2008/03/calling-y-combinator.html

<comment><USER2> YC is in other countries. 5 of the 20 startups in the current batch have non- US founders.

In fact, non-US founders seem to do better on average than US founders. I'm not sure exactly why; probably because they have to be more committed, and commitment is the biggest predictor of success in a startup. But whatever the reason, YC clearly works internationally.

I think software/web startups are basically international now. It's all one big market. Now all we need to do is explain this to the governments.

<comment><USER3> There was an article on the San Jose Mercury News last year that talked about the percentage of foreign-born founders of successful startups in the Valley was around 40-50%. If I find a link, I'll post it.

Anyway, they interviewed a number of foreign born founders, and the consensus was that it took so much risk to move to another country as an immigrant, the risk of founding a startup really seemed small in comparison.

Having grown up in Central America in the 80's myself, I'd also postulate that you're able to think outside the box a bit better as well. Why? Because to the immigrant, everything in a new country is so profoundly different to begin with, that you barely see the boxes that so many other native-born people are hung up on.

<comment><USER4> int. students graduate with 44% of STEM (Science, Tech, Eng., Math.) degrees

</comment></comment></comment><comment><USER3> There's a reason that YC is based in Boston and the Valley. The culture of risk, entrepreneurial spirit, invetment and technology in the Valley is like no other place I've ever lived, and that includes 6 states and 3 countries. Not that it's a utopia. It's not. But, if you're going to found a startup, it's the place to be.

I moved here two years ago, and I'm working as a nurse while I finish my CS degree. My goal is to be a serial entrepreneur when I'm done, and I've been setting up my life to do that for 4-5 years now. Since being here, I've received 2 offers for funding in the past 2 years. I've also been offered several introductions to VC's from people I work with in my hospital. I'm not even done with school, and I've barely talked about starting a software business at work without giving specifics. You won't get that any place else on the planet.

</comment><comment><USER5> If you are willing to do YC why not apply and do it. Successful founders have been through much more insurmountable obstacles before, why restrict yourself at the first hurdle.

As a UK founder in YC i can say that the move to the valley is really worth it and you've got to do whatever it takes to succeed.

</comment><comment><USER6> Or, equally useful would be if YC and clones could help smooth candidates' entry into the US. Has YC ever considered signing off on the founders' visas as their employer? Or providing the services of a good immigration lawyer for free?

Perhaps this should be the task of some of the overseas YC "clones" to come to SV, setup shop and perform the above, given the location's well known advantages?

<comment><USER7> I wish it was that easy to get a work visa to come into US :(. As PG said in one of the essays about why Silicon Valley is special, immigration is one area where it falls flat.

Getting a work visa is next to impossible these days. You apply by Apr 1 and you MAY know in OCT if your visa was approved or not - it is a lottery system.

6 months is a lifetime for a YC startup.

IMHO, there must be another solution, like setting up a YC hub in Vancouver or something :)

</comment></comment><comment><USER8> Startups are all about the quality of the people and their ability to work in harmony. The YCombinator type of company, requires even higher level of wisdom. If and when they'll decide to expand it will only be after they'll find the right people.

</comment><comment><USER9> Any idea why there are no efforts of starting a YC-like organization in other parts of the world? The only attempt I remember was yc-europe but I think they are gone. Isn't there any bunch of angels or VC's that are interested in doing this?

<comment><USER10> In some countries there are laws that don't facilitate the formation of seed funding companies. e.g. A funding company can't simply take 5% equity for so much money in a brand-new company. Something like that. One reason among many.

</comment></comment><comment><USER11> I would love to see YC in Australia! Even just meetups and nothing too formal!

<comment><AUTHOR> yeah, i agree. if setting up seed funding is too complicated, starting regular meets or something like startup school will still be very beneficial. In fact, that will help more than hard cash.

<comment><USER12> "In fact, that will help more than hard cash."

Totally agree with that. If I ever decide to take my ambitions any further, I can come up with a fair amount of money myself. But the advice and insight that could come from other players in the arena would be nigh-impossible to find where I am.

</comment></comment></comment><comment><USER13> That's good point, there is so much talent and so much economic activity in the BRIC countries that it is surprising that YC doesn't operate in those places.

<comment><USER14> 'Surprising'? I think pg has his hands full with the companies that he already helps, in a country where he knows how things work. Why would they go to some country where they don't speak the language, know the laws, or have many contacts? It would be insane, in my opinion.

<comment><USER13> >>Why would they go to some country where they don't speak the language, know the laws, or have many contacts?

For the same reason companies expand to BRIC economies -- to make more money. Every growing business has their hands full with operations, however the challenge is to perform the balancing act of scaling up the business through expansion while keeping the existing business in order. I wouldn't call it insane though, risky is a more appropriate term imo. Nonetheless it is a sort of risk that many businesses manage to overcome successfully. I think the real question is whether pg manages YC as a business or as a hobby.

<comment><USER14> Most companies try to grow in their home country prior to expanding abroad, and YC has yet to do any of that at all, as far as I know. Also, not all businesses try and grow all over the world in a short period of time. Some realize their limitations and try and concentrate on doing their niche really well, leaving other places to other people.

> I think the real question is whether pg manages YC as a business or as a > hobby.

My offhand guess would be "as an experiment". Past comments have indicated that they do want to come out ahead with it, to justify its continued existence, but that it's too new to just start franchising it... it's not exactly like McDonalds in terms of their business model!

<http://paulgraham.com/ycombinator.html></comment></comment></comment></comment>


IP over Avian Carriers with Quality of Service - <AUTHOR> https://tools.ietf.org/html/rfc2549 <comment><AUTHOR> Inspired by this earlier comment [0] here on HN.

[0]: [https://news.ycombinator.com/item?id=21508146](https://news.ycombinator.com/item?id=21508146)</comment>


Machine learning is not just glorified statistics - <AUTHOR> https://towardsdatascience.com/no-machine-learning-is-not-just-glorified-statistics-26d3952234e3 <comment><USER2> I've been meaning to ask if "townrdsdatascience" is a serious website, but I guess this answers it.

It seems in order for the argument here to make sense, you have to say that predictive modelling is outside the field of statistics, and that "a class of computational algorithms" (presumably including classic ML algorithms such as decision trees, random forest and support vector machines) are also not statistical algorithms.

The author gets close to having a point when saying that in reinforcement learning you may not even have a dataset, so what is there to make statistics on? Well, you make statistics on the generated data.

I think he is right once he starts talking about approach and not knowing "variance of a population, or to define marginal probability" is not necessary to perform ML. I mean, you can perform ML without knowing what variance is, just as well as you can perform psychology experiments without knowing the variance, but I get his point:

Classical statistics is very much focused on explaining a dataset, whereas ML is very much focused on making future predictions. And you can combine and build a lot of predictive models, without the knowledge of the other half of statistics, and vice versa. But this argument is like saying topology isn't math because it is about shapes and not numbers. Or that NLP is not neither machine learning or statistics, because it is about language.

<comment><USER3> > Classical statistics is very much focused on explaining a dataset, whereas > ML is very much focused on making future predictions.

True enough. Could you slightly change this and say statistics is about understanding the past and ML is about predicting the future? The only way to predict the future is to understand the past, or be very lucky.

<comment><USER4> _One branch of statistics_ is about understanding the past. Statisticians are very much interested in predicting the future and have methods that look nothing like ML.

</comment></comment></comment><comment><USER5> Mostly just arguing that it's special and not 'statistics' because it's statistics being calculated at a much larger scale in automated fashions. Seems like unnecessary gatekeeping just for the purpose of inflating egos.

<comment><USER6> His bio indicates he does 'ML @ Harvard'. I would imagine there's more than just ego riding on this.

<comment><USER7> Your suggestion is that someone who did a degree specifically in machine learning at Harvard would be less likely to be defending their discipline out of a sense of ego?

<comment><USER6> Not merely a suggestion; I'm stating outright that when someone's career (both the value of an acquired scholarly degree and the earned income within the field) depends on a field being regarded as a valid specialization, that person is going to put effort into reinforcing that perceived validity.

<comment><USER7> Oh okay! I thought you were suggesting the opposite (which is nonsense). Thanks!

</comment></comment></comment></comment></comment><comment><USER8> I would consider machine learning to be an application of statistics, in much the same way that mechanical engineering is an application of physics. The foundations of mechanical engineering are rooted in physical concepts, but mechanical engineers have formulas for all sorts of things, like calculating the fatigue life of gears, that you can't get from pure physics because they are empirically derived curve fits, rather than natural laws. The science is more pure, but the application of it is what's powerful in the real world.

So in a sense I agree that "machine learning is not statistics," but I strongly disagree with the tone of the article, which is "we're better than statistics." Don't shit on the shoulders you're standing on.

<comment><USER9> It may not be an "application of statistics" in the direct sense, but that depends on how one defines statistics, which brings one back to the original problem.

Statistics and ML often have similar goals, but ML emphasizes computational efficiency over trace-able accuracy. Thus, I view each field as having different weights on the same sub-goals.

</comment></comment><comment><USER10> Here's one way I think of it: in statistics vs. machine learning, there's a difference in your goals, which is reflected in a difference in your models.

\- In statistics, the goal is to explain something. The models have few variables, and each variable should mean something, like the influence of the person's age or sex on the outcome.

\- In machine learning, the goal is to make something work. This is apparently better done with millions of variables (neural network weights), and each variable is opaque and means nothing by itself.

He hints at this distinction in the blog post but it's not entirely clear.

<comment><USER11> That's the difference between inference and prediction. Both statistics and machine learning can do either of those things.

<comment><USER10> Can you give some examples of both?

<comment><USER4> Statistics being used for prediction: [https://fivethirtyeight.com/features/how-our-march- madness-p...](https://fivethirtyeight.com/features/how-our-march-madness- predictions-work/)

Statistics being used for inference: [https://fivethirtyeight.com/features/stephen-curry-is-the- re...](https://fivethirtyeight.com/features/stephen-curry-is-the-revolution/)

<comment><USER12> As others have pointed out, in statistics the goal is understanding something. Once you have understood it you can predict its behaviour. However the reverse is not true.

<comment><USER13> This isn't true though. There are ton's of uninterpretable model methodologies in classical statistics that have little to no ability to allow for understanding but are aimed entirely at accurate predictions. Where is this narrative that statistics is only interested in understanding coming from?

<comment><USER14> > Where is this narrative that statistics is only interested in understanding > coming from?

You may have heard of this guy called Fisher he might like to have a few words with you. He says he fathered modern Stats, that he connected what was a bag of recipes to math. Many seem to agree [0] despite the fact he does not seem to be the most pleasant bloke around. The British queen seemed awfully impressed with him though, YMMV.

[0] "a genius who almost single handedly created the foundations for modern statistical science" \-- Hald, Anders, A History of Mathematical Statistics.

<comment><USER13> I'm sure you were attempting to make a point, but you failed. But if you are trying to claim that R.A. Fisher only cared claims that statistics is only about inference, the point is moot because:

1\. R.A. Fisher isn't the Almighty Statistical God just because he did laid a lot of foundations in early statistics.

2\. Fisher has a long history of seriously stupid personal-beliefs including but not limited to: refuting anything and everything relating to Bayesian statistics, attempting to discredit the studies done showing a link between smoking and lung cancer, and advocating for eugenics and the idea of superiority/inferiority between races.

So just because Fisher may have claimed something doesn't make it so.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER15> Machine Learning is not just statistics. David Donoho spells out the history of the whole thing in his 50 Years Of Data Science:

[https://courses.csail.mit.edu/18.337/2015/docs/50YearsDataSc...](https://courses.csail.mit.edu/18.337/2015/docs/50YearsDataScience.pdf)

The clearest statement of the difference I've found is Leo Breiman's "Statistical Modeling: The Two Cultures:"

[https://projecteuclid.org/download/pdf_1/euclid.ss/100921372...](https://projecteuclid.org/download/pdf_1/euclid.ss/1009213726)

The abstract has a succinct explanation:

> Abstract. There are two cultures in the use of statistical modeling to reach > conclusions from data. One assumes that the data are generated by a given > stochastic data model. The other uses algorithmic models and treats the data > mechanism as unknown. The statistical community has been committed to the > almost exclusive use of data models. This commitment has led to irrelevant > theory, questionable conclusions, and has kept statisticians from working on > a large range of interesting current problems. Algorithmic modeling, both in > theory and practice, has developed rapidly in fields outside statistics. It > can be used both on large complex data sets and as a more accurate and > informative alternative to data modeling on smaller data sets. If our goal > as a field is to use data to solve problems, then we need to move away from > exclusive dependence on data models and adopt a more diverse set of tools.

The "stochastic data model" camp covers most of what people think of when they think of traditional stats -- everything from OLS through to more sophisticated techniques. Things like neural networks and random forests are algorithmic techniques that make no assumptions about or conclusions about the distribution of the underlying data.

<comment><USER13> The premise of the abstract is flawed though. Who says statisticians aren't using algorithmic models? Perhaps the author doesn't but random forests, clustering, PCA, gaussian processes, and even neural networks are standard fare for many statisticians.

<comment><USER15> I mean, the author certainly used random forests, seeing as he invented them:

[https://www.berkeley.edu/news/media/releases/2005/07/07_brei...](https://www.berkeley.edu/news/media/releases/2005/07/07_breiman.shtml)

<comment><USER13> I can't help but notice he died in 2005. Perhaps the premise of the two cultures was more relevant a few decades ago, but in my more recent experience, its absolutely not the case.

<comment><USER15> There is certainly cross-pollination between the two, and practitioners these days often adopt both. But the snide "machine learning is just statistics practiced by people who don't know what they're doing" comments you tend to see on HN ignore that machine learning was something that sprung up (largely in CS departments) to address challenges that statistics departments weren't addressing.

</comment></comment></comment></comment></comment><comment><USER16> "..I get it — it's not fashionable to be part of the overly enthusiastic, hype-drunk crowd of deep learning evangelists."

I think it is very fashionable. The people who are not part of this crowd are perhaps older and boring like me.

</comment><comment><USER17> _Yet, if you had asked me, or most of the students in that class, how to calculate the variance of a population, or to define marginal probability, you likely would have gotten blank stares. That seems a bit inconsistent with the claim that AI is just a rebranding of age-old statistical techniques._

So the author is asserting that... ML is statistics for people who don't know statistics? I wouldn't necessarily argue with that, but I wouldn't brag about it either...

</comment><comment><USER13> I don't love the term 'mansplaining', but if there is a term that describes essentially the same idea but in the context of academic fields, its exactly how I would describe the central thesis of this blog post and a trend I've encountered frequently in the last couple years. There is a rising tide of CS people who have just latched onto the hype of data science, and now go around letting statisticians know that no, they aren't _actually_ interested prediction, they don't _actually_ know how to work with large data, and don't _actually_ work with non-parametric methods. It certainly comes as a shock to all of the statisticians in the world who have indeed been working on these types problems for a long time now.

<comment><USER14> > It certainly comes as a shock to all of the statisticians in the world who > have indeed been working on these types problems for a long time now

Yup on high dimensional data of dimension as fantastic as 12. I feel bad for them though but they have only themselves to blame -- got too comfortable within their small world and lost touch of what the next set of interesting problems are.

Its only after getting kicked in the nuts that I see a course correction and that's enriching both ML as well as Stats.

If one computes stats on 600 data points with 10 dimensions and feels king of the hill, they can continue, but there is likelihood that some one else will be eating your lunch and you will be left behind. Sadly enough, this has already happened and is quite evident if one steps out of the stats bubble. Statistics could have been what machine learning and datamining is now, been the main driving force, the owner of initiative. On the contrary other communities are using statistics and probability motivated approaches but engineering them well to grab (funding) attention, well deserved in my opinion. It is them who got the ball rolling again.

[https://news.ycombinator.com/item?id=17687303](https://news.ycombinator.com/item?id=17687303)

<comment><USER13> Your response is so entirely off base I don't know where to begin.

> Yup on high dimensional data of dimension as fantastic as 12

Who says that has been the limit of classical statistics.

> If one computes stats on 600 data points with 10 dimensions and feels king > of the hill, they can continue, but there is likelihood that some one else > will be eating your lunch and you will be left behind.

Again, why do you have this impression? You clearly have no experience in the field if this is what you think statistics is. Unless your intent is to simply construct strawman arguments.

> Statistics could have been what machine learning and datamining is now, been > the main driving force, the owner of initiative.

This is entirely based on the assumption that machine learning and datamining and statistics are distinct and separate, which isn't the case and is my entire point.

> On the contrary other communities are using statistics and probability > motivated approaches but engineering them well to grab (funding) attention, > well deserved in my opinion. It is them who got the ball rolling again.

Seriously, wtf are you talking about?

<comment><USER18> You basically went line by line to take too many words to say "you're wrong". That's how much content is left over after you filter out the insults.

</comment></comment></comment></comment><comment><USER19> "The world's frontier of technological progress and innovation." What does that even mean? All other progress and innovation is somehow trailing behind ML? What?

</comment><comment><USER20> What a silly/confused article. To say it's not stats because someone can implement a GAN without deep stats knowledge is ignoring everything that's lead to that point. It's like arguing there's no assembly in programming because I can write and understand hello world in Python. Your fancy GAN is not coming from a vacuum. It's been built on top of a ton of math+stats, and then you end up implementing it in tensorflow which itself is a bunch of abstractions done for you.

</comment><comment><USER21> By definition machine learning is Statistics + Decision Theory. Statistics simply tells you what information you have about the world, not what to do with that information.

</comment><comment><USER22> Yes it is. Having a bigger model state makes it more complex. It doesn't make it not statistics.

</comment><comment><USER23> Quote:

"One of our assigned projects was to implement and train a Wasserstein GAN in TensorFlow. At this point, I had taken only an introductory statistics class that was a required general elective, and then promptly forgotten most of it. Needless to say, my statistical skills were not very strong. Yet, I was able to read and understand a paper on a state-of-the-art generative machine learning model...Yet, if you had asked me, or most of the students in that class, how to calculate the variance of a population, or to define marginal probability, you likely would have gotten blank stares. "

I agree that the GAN might be implementable without much stats knowledge, but I would be very surprised if someone who did not know population variances and marginal probabilities would be able to follow the Wasserstein GAN paper. Just see for yourself: [https://arxiv.org/abs/1701.07875](https://arxiv.org/abs/1701.07875)

</comment><comment><USER24> This is a terrible post, coming from someone who doesn't know statistics to claim something is not statistics.

<comment><USER17> _his is a terrible post, coming from someone who doesn 't know statistics to claim something is not statistics._

But the author went to Harvard, doncha know. _Harvard_.

</comment></comment><comment><USER25> Yes, it is.

<comment><USER26> No, it's worse. It's statistics on steroids used by people who don't have a clue about statistics.

<comment><USER27> >At this point, I had taken only an introductory statistics class that was a required general elective, and then promptly forgotten most of it.

</comment></comment></comment><comment><USER12> This sentence sums it up perfectly:

> In many cases, these algorithms are completely useless in aiding with the > understanding of data and assist only in certain types of uninterpretable > predictive modeling.

Statistics is a crucial component of the scientific method. It is the tool with which scientists check whether their theories agree with empirical evidence.

Machine learning is about building mathematical models that are apparently "right", in the sense that they have predictive power, but that don't necessarily improve our understanding of the data-generating processes involved.

</comment><comment><USER28> I was listening to Lex Fridman's AGI Podcast where Vladimir Vapnik came to talk about Statistical Learning[0] and his take on deep learning as compared to statistics/mathematics was dismissive. To paraphrase from memory, the problems deep learning is solving is not hard enough.

There has been a rift between the statistical community and ML community for a while and I see it similar to the arguments one makes when it comes to sciences vs engineering.

[0] [https://lexfridman.com/ai/](https://lexfridman.com/ai/)

</comment><comment><USER29> I have to frequently work with Data Scientists to learn their ML models and scale them in our production environments. A lot of times the models are not even statistics, it's just linear algebra. They have a tendency to go for approximate algorithms when an exact algorithm could be written. I largely blame the company for this and not the data scientists. Every company wants to be in the ML game but may not have the volume and variety of data to warrant a use case. When your favorite hammer is ML then every data problem is a nail.

</comment><comment><USER14> The post makes two main claims

"Machine Learning Does Not Require An Advanced Knowledge of Statistics"

Lets take it at its face value, even then it does not preclude ML from being glorified stats. Depending on how advanced the 'advanced' is in that statement I would agree with it. To use ML tools well you do need some familiarity with understanding how uncertainty effects the results and that is as up one can be statistics alley. I say this although I am firmly in the ML side of the tribe. BTW I would even claim this

"[Practicing] Machine Learning Does Not Require An Advanced Knowledge of Machine Learning"

The other claim that the post makes is

"Machine Learning = Representation + Evaluation + Optimization"

Whoah! big blind spot there. Dealing with and reasoning about uncertainty, generalization is a big deal in ML. Sure, it helps to argue that ML and stats is different if one ignores that bit.

I do think ML and Stats is different but not for those reasons.

Yeah ML brings to bear some tools that card holding statisticians have traditionally not used in anger before, for example, advanced and large scale optimization, algorithms, data structures.

Using new tools to address the same question does not qualify as a deep difference in my books. For example, even the fields of optimization and algorithms themselves use tools that are different from what the tools were 50 years ago. I think the main difference is in the questions that ML and Stats wants to answer, and here there indeed are differences.

Stats (barring edge cases) is primarily interested in going from a sample to making claims about the population, or making claims about something via a claim about the population. ML is primarily interested in going from a sample to another sample. (Do note sample is a collective noun.) Now, there have been statisticians (fewer in number) and a body of statistics literature that has focused on prediction as opposed to parameter recovery, but that's not main stream in Stats.

And finally in pseudo-quotes "I managed to train a model without knowing what variance is. I know variance is statistics. ML is not Statistics ... QED ". Ah I see, nevertheless, not what I would call a brilliant case of logical deduction".

</comment><comment><USER30> If you start your article with the assumption that ML is being a subject to memes because "it's not fashionable to like it" \-- which also includes "liking" it, as if it's some kind of aesthetics art... Then your argument falls apart from the get go.

Perhaps the author should use ML itself to find out why people started mocking it!</comment>


Implementing the Exponential Function - <AUTHOR> https://www.pseudorandom.com/implementing-exp <comment><USER2> A couple other ways to compute the exponential function: The Intel 8087 coprocessor used CORDIC. The chip contained a ROM with the values of log2(1+2^-n) for various n. These constants allowed the exponential to be rapidly computed with shifts and adds.

The Sinclair Scientific calculator was notable for cramming transcendental functions into a chip designed as a 4-function calculator, so they took some severe shortcuts. Exponentials were based on computing 0.99^n through repeated multiplication. Multiplying by 0.99 is super-cheap in BCD since you shift by two digits and subtract. To compute 10^x, it computes .99^(-229.15*x). Slow and inaccurate, but easy to implement.

<comment><USER3> I was going to say there is a great article about the Sinclair Scientific here:

[http://files.righto.com/calculator/sinclair_scientific_simul...](http://files.righto.com/calculator/sinclair_scientific_simulator.html)

And then I noticed who I'm replying to...

Despite its flaws, this calculator was quite an achievement, doing everything it did with a ROM that holds only 320 instructions.

<comment><USER4> That calculator is a hack in the most positive and brilliant sense of the word. Crazy constraints required crazy solutions. Amazing!

</comment></comment></comment><comment><USER5> Great post! The author touches on Chebychev polynomials, which are the basis for quite a few numerical analysis tricks, including conjugate gradient [1], accelerated gradient descent [2], and Chebychev semi-iterative methods (which find the best combination of past iterates to use during an optimization procedure; sadly I can't find a good reference).

There are a number of facts/folklore about Chebychev polynomials that seem to go stated without proof in a lot of papers, so a few years ago I wrote up some notes [3,4] with the most common claims. Maybe someone will find them useful!

[1] (p35) [http://www.cs.cmu.edu/~quake-papers/painless-conjugate- gradi...](http://www.cs.cmu.edu/~quake-papers/painless-conjugate-gradient.pdf)

[2] [http://blog.mrtz.org/2013/09/07/the-zen-of-gradient- descent....](http://blog.mrtz.org/2013/09/07/the-zen-of-gradient-descent.html)

[3] [https://benrbray.com/static/notes/chebychev- polynomials_dec1...](https://benrbray.com/static/notes/chebychev- polynomials_dec16.pdf)

[4] [https://benrbray.com/static/notes/minimax- approx_nov16.pdf](https://benrbray.com/static/notes/minimax-approx_nov16.pdf)

<comment><USER6> And also quite useful in a wide range of numerical methods for PDEs like discontinuous Galerkin (and spectral methods in general).

</comment></comment><comment><USER7> This is an awesome article! One of my favorite SO answers I remember researching dealt with the Padé approximation of tanh[1] (which I found was significantly better than the Taylor expansion), but the caveat was that it only worked within a very narrow neighborhood.

I will say that the article didn't really touch on techniques that minimize IEEE 754 subnormal[2] performance impact, which is a very interesting problem in itself. A lot of real-life implementations of something like e^x will have various clever ways to avoid subnormals.

[1] [https://stackoverflow.com/a/6118100/243613](https://stackoverflow.com/a/6118100/243613)

[2] [https://mathworld.wolfram.com/SubnormalNumber.html](https://mathworld.wolfram.com/SubnormalNumber.html)

<comment><USER8> Hi, I am the author. You make a good point about subnormals, thank you. I will jot that down for a future update to the doc :)

It is funny you mention the Padé approximation; I was debating whether or not to include that in this article. Originally I planned to stop after Minimax (using Remez), but if I include rational approximation schemes anyway (e.g. Carathéodory-Fejer), it probably makes sense to implement and analyze that as well.

<comment><USER9> Just jumping into to say I am loving the article, thanks! I'm dealing with a lot of exps in an optimization problem right now and frankly only have cursory understanding of what's going on under the hood so this was very enlightening for me. Thanks again.

</comment></comment></comment><comment><USER10> I recently implemented the exponential function for a sound synthesizer toolkit I'm working on. The method I used was not mentioned in the article, so I'll explain it here.

I used the Remez algorithm, modified to minimize equivalent input error. This algorithm lets you find a polynomial with the smallest maximum error. You start with a set of X coordinates, and create a polynomial which oscillates up and down around the target function, so p(x0) = f(x0) + E, p(x1) = f(x1) - E, p(x2) = f(x2) + E, etc.

You then iterate by replacing the set of x values with the x values which have maximum error. This will converge to a polynomial with smallest maximum error.

From my experiments, you can use a fairly low order approximation for musical applications. Used to calculate frequencies of musical notes, 2nd order is within 3.0 cents, and 3rd order is within 0.13 cents.

<comment><USER11> I wouldn't recommend doing this directly -- there's no good polynomial that can represent the exponential function well over a wide range.

Instead, it's better to exploit the definition of IEEE754 as an exponent and a mantissa. You calculate the exponent directly (because e^x = 2^(x/ln2)), and use the Remez algorithm to find a polynomial that fits just the mantissa.

<comment><USER10> Honestly, reading this comment made me a bit unhappy. Don't mansplain to me the things that I've done. The Remez algorithm requires that you specify the domain. If you tried to use it to approximate the exponential function over its entire domain the algorithm would diverge.

You have to explicitly choose a range [x1,x2] for the Remez algorithm. It minimizes the maximum error over that range.

I'm ordinarily happy to share the work I'm doing but this comment reminds me of the reasons I don't share much with HN.

<comment><USER11> I'm writing this because I've done it too, for a performance-critical embedded application, and I think it's an insight worth sharing, for anybody else who comes across this and is trying to do something similar. Not to put you down or one-up you or anything; I'm very sorry to have come across that way. Can I try again?

For a domain like [0,1], the Remez algorithm will do a great job -- because the exponent is barely changing, just the mantissa. For a range like [-10, 10], you won't find any polynomial of reasonable order that has acceptable error.

But, there's a really neat trick that _does_ let the Remez algorithm work over the entire domain of floats, and get excellent performance with just a fourth or fifth order polynomial, or even third order if you're pressed for time, and minimal extra computation.

That is, with just a little simplification, you multiply x by (1/ln(2)), floor it, and stuff the resulting integer into the exponent bits. Then, you take the remainder (what is left over after taking the floor), and make _that_ your input to the polynomial, and stuff the result into the mantissa bits.

There's a little more to it; signs and NaNs need to be handled correctly, subnormal numbers can be treated as a special case with a different Remez polynomial, and a few other corner cases and exact values might be important (e^0, e^1, e^-1). But the result works wonders and it's basically just using Remez but transforming the input to a domain that behaves more like a polynomial, leveraging the magic of IEEE-754.

<comment><USER8> This is a good explanation of range reduction with respect to floating point. I use a similar (but not quite identical) techniue in the article; I may expand it with more information about what's happening with the exponent and mantissa bits like you did here.

That reminds me, I'm using the domain [-1, 1] for range reduction. But by symmetry of e^x, I can actually use [0, 1]. Thank you!

<comment><USER10> Depending on the particular architecture you may prefer [-0.5, +0.5].

</comment></comment></comment></comment></comment></comment><comment><USER12> Need to be careful about confusing smooth (infinitely differentiable) and analytic (= to Taylor series) functions.

> Any function with this property can be uniquely represented as a Taylor > series expansion "centered" at a

It's fairly easy to construct tame looking functions where this isn't true.

<comment><USER13> Blessedly, in the complex analytic setting, these coincide, to they not? [Attempting to sanity-check my own understanding here]

<comment><USER14> In fact it is enough for functions to be complex differentiable once (in which case they'll automatically be differentiable infinitely often).

<comment><USER15> It's one of those theorems that still boggles my mind even though I know it for so many years now. Either complex functions are so much well behaved or complex differentiability is so much stronger condition, I can't decide which. Top it off with the uniqueness of analytic continuation and you start to wonder what causes real functions to be such a pain.

If anyone knows some nice articles about this topic I would love to read them

<comment><USER16> One way of understanding why complex differentiability is so strong is looking at a complex-to-complex function as a real function of two real inputs and two real outputs. The fact that h rather than |h| appears in the denominator of the complex derivative causes the derivative to be "aware" of the rotational nature of complex functions: this turns into a differential equation which must be satisfied by the real function (the Cauchy-Riemann equations).

</comment></comment></comment></comment></comment><comment><USER17> [Aside on Taylor Series] The section on recurrence relations is the basis of a little-known ODE solving technique sometimes known as the Taylor Series Method (occasionally Differential Transform). It allows an "extension" of Euler's Method to arbitrary order (using arbitrary precision arithmetic), by _calculating_ the higher derivatives rather than approximating them as in RK4 and friends.

Here is an open access link to just one of many papers on the subject: [https://projecteuclid.org/euclid.em/1120145574](https://projecteuclid.org/euclid.em/1120145574)

It includes a link to the actual software they used.

[EDIT] Obviously applying the technique above to dx/dt = x reproduces the Taylor Series in the article!

</comment><comment><USER18> Really interesting article!

Some other resources you may find interesting

[https://fpbench.org/index.html](https://fpbench.org/index.html) \- I think I saw a talk at FPTalks that felt related to your topic "Creating correctly rounded math libraries for real number approximations"

[https://fpbench.org/community.html](https://fpbench.org/community.html)

[https://hal-ens-lyon.archives-ouvertes.fr/ensl-01529804](https://hal-ens- lyon.archives-ouvertes.fr/ensl-01529804) \- Correctly Rounded libm

[https://www.mpfr.org/](https://www.mpfr.org/) \- GNU Multi precision floating point

[http://sollya.gforge.inria.fr/](http://sollya.gforge.inria.fr/) \- A tool for floating point code development

</comment><comment><USER19> A collaborator and I recently had fun code golfing integer implementations of floor(106*log2(x)) and floor(log2(x!)):

[https://github.com/sipa/minisketch/blob/master/src/false_pos...](https://github.com/sipa/minisketch/blob/master/src/false_positives.h#L20)

</comment><comment><USER20> Excellent article; it's very detailed in the mathematical explanations and code.

I was interested in the exponential function too, but approached it from the standpoint of arbitrary-precision arithmetic. My explanation is an order of magnitude shorter, but of course my code is a lot slower than a typical floating-point algorithm. I offer a way to compute correctly rounded exponentials without resorting to a big math package like Mathematica/Maple/etc. [https://www.nayuki.io/page/approximating-eulers- number-corre...](https://www.nayuki.io/page/approximating-eulers-number- correctly)

</comment><comment><USER21> "We can see the values are relatively densely clustered near 0 and increasingly sparse the further you move away from the origin. As another example, half of all 32-bit floating point numbers reside in the real interval [-1,1]. "

I knew this in general but this specific statistic was eye-opening to me. Systems like OpenGL normalize coordinates so they only use values in this [-1,1] range. That means they effectively lose half the expressive power of the 32 bits. Are there other machine representations of real numbers which would be better for that use case? i.e. restricted to that range and evenly distributed?

<comment><USER22> 'half' is ambiguous here: They lose 1 bit of expressiveness for the mantissa, and 1 bit in the exponent, giving an efficiency loss of 2 bits from 32 == ~3%.

So there's very little loss in using single-precision floating point, and a lot of gains in smoothly handling larger numbers that arise from addition et al.

edit: I'm half wrong. The bit in mantissa isn't wasted, the only bit that's wasted in the sign bit in the exponent, so the efficiency loss is ~1.5%

<comment><USER21> It agrees with my intuition that one bit lost would reduce the values by half. I probably don't understand what is meant by efficiency loss but my point is that a different (theoretical non floating point) encoding would be able to represent twice as many values within [-1,1] for the same 32 bits. For some applications that seems like it would be a win.

</comment></comment></comment><comment><USER23> Ugh I had to implement all the transcendental functions a while ago. It was miserable, especially dealing with intermediate rounding, etc

I don't recommend it.

That said I liked that there's a specific exp-1 function (otherwise you drop most precision).

<comment><USER24> To go with that, you need ln(1+x). HP calculators had both.

<comment><USER25> As has C (since C99)

[http://www.cplusplus.com/reference/cmath/log1p/](http://www.cplusplus.com/reference/cmath/log1p/)

</comment></comment></comment><comment><USER26> Enjoying the article. Looks like there's a math typo at the tail of the "Precision Bound" section:

        $$ \log\left(\frac{x e}{n}\right) \leq \frac{1}{n}\log(\eta) $$

is not equivalent to

        $$ \frac{xe}{n} \leq \eta^{-n} $$

The latter should be

        $$ \frac{xe}{n} \leq \eta^{1/n} $$

and the "$x^{-n}$" in the following paragraph should be changed accordingly.

Certainly understandable flub, though. Working with logarithms, it's easy to mix up minus sign vs. 1/n conversions.

<comment><USER8> Nice catch, thank you. I'll edit that and credit your comments in the errata :)

</comment></comment><comment><USER27> There's 2 cool things related to floating point error I learned recently.

First, `x + x + x + x + x == 5 _x`. This is true for values up to 5, but is not true for 6. Proving this is a fun exercise, but is a little bit painful and has a lot of cases.

Second, SMT solvers can actually prove stuff like this relatively easy! In Z3py, one can prove this in 4 lines of code.

from z3 import _ x = FP('x', FPSort(8, 24)) set_default_rounding_mode(RNE()) solve(5*x != x + x+ x+ x + x)

</comment><comment><USER28> IMHO it's a bit cheeky to use exp2 from the standard library. It's likely got all the same math exp does. Fortunately, if you know that your exponent is an integer, there's a constant time version. It's 5 instructions: add, and, shift, mov, ret.

[https://godbolt.org/z/KNyoVd](https://godbolt.org/z/KNyoVd)

<comment><USER8> Excellent, thank you! I agree, I had the use of `exp2(x)` on my list of implementation nits to revisit. I'm going to revise to use your method and credit the comment.

</comment></comment><comment><USER29> Nice article, thanks. For anyone interested in the topic, I highly recommend Trefethen's Approximation Theory and Approximation Practice. It's approachable, intuitive, and fun while still covering a lot of technical detail.

<comment><USER8> I have that in the further reading section :) I personally consider it one of the best textbooks on numerical analysis.

I only wish Trefethen had written it with general C/C++ instead of his own custom MATLAB library, chebfun. One of these days I'd like to get around to implementing chebfun in C++.

</comment></comment><comment><USER30> Great read and stunning web design (short of the small italics in the abstract that are a little harder to read). A beautiful first post, certainly.

</comment><comment><USER31> Few miscellaneous meta nitpicks:

* The article looks beautiful, but am I the only one that hates left-centered content? Wide monitors are the norm these days, and reading left centered content literally hurts my neck (need to resize manually to center the content, approximately.

* Why would someone make the effort to write such detailed analysis and conceal their identity? I just don't get what's the objective of not providing any sort of provenance... just a gripe of mine.

</comment><comment><USER32> I was exactly looking for that today, thanks

</comment><comment><USER33> Very good article! Thanks!

</comment><comment><USER34> This is a great read!</comment>


Amethyst: Tiling window manager for macOS along the lines of xmonad - <AUTHOR> https://ianyh.com/amethyst/ <comment><USER2> Going to have to try this out</comment>


The Most Challenging Problems for Entrepreneurs, Designers and Product Managers - <AUTHOR> http://keynotopia.com/do-you-know-the-top-daily-challenges-of-others-just-like-you/

<comment><USER2> Lots of startup ideas there!</comment>


Ask HN: Using Google Apps for personal domain - <AUTHOR> I am thinking of using Google Apps for my personal domain. I'm a bit concerned about privacy issues, but I also enjoy the other services Google provides with its G Apps account.<p>Finally, I'm concerned Google can basically freeze my account at anytime. Any advice on best options for reliable mail accounts with add-on services, or general best practices for privacy and account recovery? <comment><USER2> Fastmail is gr8.</comment>


Infectious Dose May Explain High Mortality of 1918–1919 Pandemic (2010) - <AUTHOR> https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2909907 <comment><USER2> > Conclusion

> The increase on the proportion of infectious persons as a proxy for the > increase of the infectious dose a susceptible person is exposed, as the > epidemic develops, can explain the shift in case-fatality rate between waves > during the 1918 influenza pandemic.

I don't have the tuits to read and analyze the entire paper, but I pasted the conclusion above.

My interpretation is that a longer period of "social distancing" would have helped in 1918, though it was so infectious that it went global before airliners.

As apparently people were still infectious after they felt better and left their house, causing healthy people to become even sicker than expected with the increased viral load from both pre-symptom and still recovering patients.

Can somebody study the entire paper and see if my interpretation is what the paper is implying?

Also, for those not familiar with that pandemic, it was a subtype of H1N1 and the highest in fatalities, killing 50-100 million people, and occurred near the end of WW1, which also meant famine in parts of Europe. Like corona, it affected the lungs.

[https://en.wikipedia.org/wiki/Influenza_pandemic](https://en.wikipedia.org/wiki/Influenza_pandemic)

A lot of nobility died in WW1 (machine guns killed soldiers and their commanders alike), which ended the influence of European royalty outside Britain.

<comment><AUTHOR> > As apparently people were still infectious after they felt better and left > their house, causing healthy people to become even sicker than expected with > the increased viral load from both pre-symptom and still recovering > patients.

That is not how I interpreted it. If you are out of the house, you are more likely to get a smaller dose of the infection (such as from a handrail or something), and therefore your immune system is going to have a head start on fighting it.

If everyone is home on the other hand, and one person in the house gets sick, then everyone else in the house is more likely to get a higher dose of the infection due to the repeated proximity to others in the house. And therefore the infection is gaining a foothold and head start against the immune system.

</comment></comment><comment><USER3> Could this partly explain why healthcare workers are being hit particularly hard by COVID-19, including young ones?

<comment><AUTHOR> Yes.</comment></comment>


Fukushima Daiichi Nuclear Plant Hi-Res Photos - <AUTHOR> http://cryptome.org/eyeball/daiichi-npp/daiichi-photos.htm

<comment><USER2> Interesting, from the second pic it looks like reactor building 4 was crushed inward at the top by the blast wave from the building 3 explosion, crushing even the concrete structural beams and columns.

You can also see a 60 ft diameter hole in the turbine building from something lofted by the explosion, possibly the top of the secondary containment structure.

</comment><comment><USER3> That looks miserable.</comment>