HNHacker News
TopNewBestAskShowJobs

fdej

1,760 karma · joined September 20, 2011

http://fredrikj.net
submissionscomments
fdej··on Obfuscated Tiny C Compiler (2002)
Wait, what? 50 milliseconds per line of code? How is that even possible?
fdej··on How to write efficient matrix multiplication
This trick does work. If the matrices are in row-major order, you transpose B in memory and then compute A * (B^T)^T. This multiplication reads both matrices in row order.

However, while this does improve performance over the naive algorithm, it's still not as good as a tiling algorithm.

fdej··on The world split into 7 equal areas of population
I've never seen South America look that pointy.
fdej··on Jupyter, Mathematica, and the Future of the Research Paper
You have to work with multivariate polynomials (possibly over number fields). If you have symbolic expressions in another format, you would have to manually convert them to that representation first, possibly after introducing extra variables for non-algebraic constants (which may or may not be a good idea depending on the specific circumstances). Having that kind of rewriting done automatically would certainly be a good thing!
fdej··on Jupyter, Mathematica, and the Future of the Research Paper
In Julia, there is Nemo.jl for high performance exact and symbolic linear algebra. At least that is the goal; it doesn't have the best algorithms yet in all cases, but it has some of them (and more are being developed). You can see some examples here: http://nemocas.org/benchmarks.html
fdej··on Jupyter, Mathematica, and the Future of the Research Paper
> On the other hand, open source tools are catching up.

SymPy is doing nicely, but it's decades behind Mathematica when it comes to symbolic computation.

By the way, if you want to invert a symbolic matrix, chances are that generic Gaussian elimination working with symbolic expressions isn't the best algorithm (it might even give wrong answers if zero testing is done incorrectly), and compiled code isn't going to change that. The state of the art in symbolic linear algebra uses specialized algorithms like evaluation-interpolation, modular computation, and all kinds of low level optimizations.

fdej··on Jupyter, Mathematica, and the Future of the Research Paper
Here is an article from a couple of years ago about how one group of mathematicians were misled by (and had to spend some time tracking down) a bug in Mathematica determinant evaluation: http://www.ams.org/notices/201410/rnoti-p1249.pdf
fdej··on The Story of a Voice: HAL in ‘2001’ Wasn’t Always So Eerily Calm
There are exceptions, notably among classical composers. Bach composed the Mass in B minor and The Art of Fugue in the last years of his life (the former completed the year before his death, the latter unfinished). They are among Bach's most complex and ambitious works, clearly made in the pursuit of artistic perfection and to eclipse all previous works (or rather, soli Deo gloria). It's debatable which of Bach's works are really most popular, but they are both up there.
fdej··on The Multiworse Is Coming
Could you elaborate on what you perceive as the problem with falsificationism? I'm familiar with the philosophical argument that Popper's demarcation of science is too narrow. What is less clear is that this argument over the definition of science currently has any influence on scientific practice. Are there some examples where scientists (or funding agencies) have adhered to "falsificationism" in a way that impeded progress? This is in contrast with the other issues you mentioned: peer review, publication-oriented research and abuse of the null hypothesis (by which I assume you mean p-hacking and its cousins), which I agree are very real problems in practice.
fdej··on Tensor Comprehensions
Yes, this is just jargon specific to the HPC / numerical analysis field.
fdej··on Inventor Claims to Have Solved Floating Point Error Problem
It's a plain C library with an API very similar to GMP, so an option would be to wrap it from Rust, which should not be too difficult.
fdej··on Inventor Claims to Have Solved Floating Point Error Problem
I'm the main author of Arb. Note that it's an arbitrary-precision library. It's ~100x times slower than hardware floating-point because of using arbitrary-precision floating-point numbers implemented entirely in software. But if you have to do arbitrary-precision arithmetic to begin with, Arb's error tracking only adds negligible further overhead.

For machine precision, I believe ordinary interval arithmetic is the best way to go still. Unfortunately, this not only uses twice as much space; the time overhead can be enormous on current processors due switching rounding modes (there are proposed processor improvements that will alleviate this problem). However, the better interval libraries batch operations to minimize such overhead, and it's even possible to write kernel routines for things like matrix multiplication and FFT that run just as fast as the ordinary floating-point versions (if you sacrifice some tightness of the error bounds).

Regarding the article, using a more compact encoding for intervals is a fairly old idea and I'm not really sure what is novel here.

fdej··on Donald Knuth’s 80th birthday will be celebrated by two events in Piteå, Sweden
It makes me sad that Knuth will no longer be at a prime age, but on the other hand, one more year and he will return to perfect power.
fdej··on Ciao, Chrome: Firefox Quantum Is the Browser Built for 2017
It reminds me of Phoenix (to become Firefox), and how much of an improvement it was over the Mozilla browser. It makes me wonder where things went wrong, as I recall the Firefox of ~2005 being snappier than the one of ~2015. The only discrete drop in performance that I can remember was the addition of the AwesomeBar (which was worth it, but it really annoyed me at the time that just typing in an address became sluggish). Of course, my memory about these things could be completely wrong, and in any case web 2.0 gradually took over and websites accreted JavaScript faster than the hardware could improve, so comparing today with 10-15 years ago isn't really fair... Well, congrats to the Firefox developers, because it really is a pleasure to use again.
fdej··on I don’t want to be a software developer anymore
> 5-6 hours a day biking in -15C snow with wet feet (Mailman).

As a Swede, aren't you familiar with the saying "There's no such thing as bad weather, only bad clothes"? :-)

I did spend one summer planting trees in Sweden. It was miserable, but in a good way: I'd sleep well every night. I'm not sure how well I'd put up with something like that over an extended period of time though.

fdej··on Why does man print “gimme gimme gimme” at 00:30?
There is plenty of cringey non-programmer humor.
fdej··on Modern Computer Arithmetic (2010) [pdf]
This is a good book. Note that it's mostly concerned with (software implementation of) arbitrary-precision arithmetic; which is just one branch of computer arithmetic.
fdej··on Hardware support for UNUM floating point arithmetic [pdf]
The idea is that computers spend much more energy moving data between the processor and memory than actually processing the data. Unums use a variable length encoding which makes processing more costly but reduces the amount of data transfer. At least in theory; whether this is a net benefit remains to be proven.
fdej··on A regression is the kernel not giving the same result with the same user space
If only compiler developers had this attitude.
fdej··on Scipy 1.0 released
Lots of related projects getting that long overdue major version number now. SymPy 1.0 was released last year and I released mpmath 1.0 less than a month ago, both projects 10 years old. SciPy's 16 years is a notch more impressive, though. Congratulations, and thanks to the SciPy developers for their hard work!
fdej··on Sci-Hub: Public access to research papers
We researchers don't get paid for our papers. We give the publishers our papers for free so that they can make money by putting them behind a paywall. We sometimes even need to pay the publishers to publish our papers. The paywall can sometimes be removed by paying the publisher even more to compensate for their loss of income.
fdej··on Purism Librem Laptops Completely Disable Intel’s Management Engine
My HP laptop has a single column with delete/home/pgup/pgdn/end, like this: https://h30434.www3.hp.com/t5/image/serverpage/image-id/3646...

This works very nicely for me.

fdej··on New periodic orbits of the three-body problem
This is not a new idea. If you have a variable-order, variable-precision implementation, it's the most obvious way to estimate the error of a numerical solution.
fdej··on New periodic orbits of the three-body problem
In fact the more general N-body problem is perhaps one of the most classical uses of high order Taylor methods, in particular for studying the long term stability of the solar system. Here is a paper from 1993: http://adsabs.harvard.edu/full/1993A%26A...272..687L. Rigorous error analysis of Taylor methods for ODEs goes all the way back to Moore's original work on interval arithmetic in the 1960s; in the early 2000s Makino and Berz developed so-called Taylor models which combine rigorous error bounds with accurate long-term propagation of changes due to perturbations in the initial values (see http://bt.pa.msu.edu/index_TaylorModels.htm); they used it to study the dynamics of the solar system among other things. R. Barrio and others have published several papers about reliable solution of ODEs using Taylor methods; leading to the development of the TIDES software. See several references listed on http://cody.unizar.es/tides.html. In particular the paper https://doi.org/10.1016/j.amc.2004.02.015 from 2005 investigates using variable order Taylor series with extended precision for the solutions of dynamical systems. The paper http://dx.doi.org/10.1155/2012/716024 from 2012 is specifically about obtaining periodic solutions of dynamical systems using a high order Taylor method with multiple precision arithmetic.

Actually, I made the first comment after I checked the second author's earlier paper https://arxiv.org/abs/1109.0130 where they essentially made the claim about inventing "CNS" as the first-ever reliable technique for long-term solutions of dynamical systems, without referencing any of the earlier work I mentioned above.

However, I just checked the actual text of this new article on the three-body problem (through sci-hub) and there the authors do cite the earlier work I mentioned above, giving proper attribution to others for the basic ideas behind what they call "CNS"! So all is actually well, and the peer review presumably did work (or the authors found out about the earlier work even before writing the new paper). It is just the press release that is misleading, as usual.

To answer your question, I'm not really familiar with the research on the N-body problem, so I can't say why or whether no one tried looking for periodic solutions in this way before. Perhaps no one actually thought of it, or they didn't try since they didn't expect to find anything, or they didn't have the computational resources, or they just couldn't figure out the details of how to do it (which the present authors did, and deserve credit for). Again, I was not trying to downplay the significance of this work, and finding new applications of existing methods (and making even tiny improvements along the way) is how science progresses. It also happens all the time that methods get rediscovered/reinvented independently.

fdej··on New periodic orbits of the three-body problem
The "CNS" is as far as I can tell just the use of a high order Taylor series together with multiple precision arithmetic for solving ODEs. This is a well known method for long term simulation of dynamical systems that has been around for decades. The authors basically imply that they invented this method and were the first to be able to study long term evolution of dynamical systems reliably because of it. Fair enough if they just weren't aware of previous work (which happens all the time), but it's an oversight that shouldn't have passed peer review.

That said, using this method to discover new periodic solutions of the three-body system is a very neat application, which deserves applause!

fdej··on Wikimedia Foundation's runaway spending growth
I do publish in paywalled journals but all my papers are freely available as preprints from arxiv. Also, all software is open source.
fdej··on Wikimedia Foundation's runaway spending growth
As an academic who travels a fair amount, I try to pick the cheapest available flight (within reason), and I've certainly never even considered flying business class. I think flying business class is permitted under certain conditions if there's still money in our travel budget, but it wouldn't feel like a good way to use taxpayer money. I think I would feel the same way working for a nonprofit funded by donations.
fdej··on The enigmatic complexity of number theory
I'm not so sure that we're missing anything basic. The top rated answer by Scott Aaronson seems spot on to me. The natural numbers are just too powerful. As the resolution of Hilbert's tenth problem shows, we can at best hope to solve special cases of statements involving natural numbers, and the solvable cases are bound to require techniques of increasing complexity.

What would count as a "master theorem" for some field, anyway? I suppose something like Tarski's quantifier elimination of semialgebraic sets over R^n might be an example, though for actual computations the best algorithms have double exponential worst case complexity (i.e. even worse than integer factorization). Or for something even more basic, perhaps the fundamental theorem of linear algebra (along with Gaussian elimination). There's the saying that mathematics is the art of reducing any problem to linear algebra -- I suppose the hard problems in number theory are the ones that don't have a good linear algebra reformulation :-)

fdej··on HAKMEM (1972)
Yes, this was proved by F. Carlson in 1921 and it is known as the Pólya–Carlson theorem.
fdej··on Text-only CNN
Google was a huge improvement because if you searched for Foo Bar Baz it would only give you pages that had all the words Foo, Bar and Baz whereas AltaVista et al. would give you pages containing any of the words, if memory serves. But the speed was a huge deal too, especially on a 56k modem (and the thing had to be rendered in IE4 on a Pentium II too, let's not forget).
← PreviousPage 3 of 10Next →