HNHacker News
TopNewBestAskShowJobs

mixedmath

1,485 karma · joined January 11, 2015

[ my public key: https://keybase.io/davidlowryduda; my proof: https://keybase.io/davidlowryduda/sigs/fJDhN1ncn9yUYjFl2nw2r-mskFwuufeYD-dczdCuXpE ]

I'm a mathematician and software developer. Now I work with libraries (as in books, not as in software --- though I do software for the libraries) in many varied ways.

submissionscomments
mixedmath··on Weak rules allow ultra-processed foods like Lunchables on school menus (2023)
I don't follow the implication. I think you're suggesting that in France, they're not 100% beef. What are they?
mixedmath··on SymPy: Symbolic Mathematics in Python
Yes, I do. And open source software can have papers and algorithms documenting various aspects. This is very much like using results of other math research papers, in that there is communal review and trees of dependencies and everything can be cross-verified.

It is also true that, just like with a generic math research paper, that I don't check every claim of every step of every implementation of every algorithm in the process. But checking is possible, and when we find errors (which we do frequently) we can look and try to explain what it happening.

But when we find errors in tools such as Mathematica, we cannot. We report the errors and then know nothing more. (And sometimes the errors are never fixed).

mixedmath··on SymPy: Symbolic Mathematics in Python
I'm a mathematician. One reason it matters to me is that if I write a program that computes something in a proof, I need to be able to understand and verify (or possibly check that other people I trust have verified) the source and algorithms.

I have also modified and extended open source implementations in sage to work with cases I needed. And I've added some of this back to sage.

It is undeniable that Mathematica evaluates crazy integrals better than most other tools. But it will happily output complete nonsense. And you can't check!

mixedmath··on Notes on paper (2023)
I've found digitizing notes is not useful to me. I digitized all my notes from grad school and they're sort of a wash now.

I still take lots of paper notes. One thing that had been very useful is to make (short, simple) indices in my paper notes and to digitize just the indices.

It takes almost no time. The result is that when I want to look at old noted I can look up where in my digital indices, and then walk over to a shelf and pick out my notes. I've used this *a lot* and it's surprisingly helpful.

Caveat: I'm a mathematician, so I have a lot of paper notes and half-baked ideas. So my paper notes often look more like a set of laboratory notebooks and not idle learning notebooks. I essentoally never look back on noted I take while learning some new subject.

mixedmath··on LaTeX and Neovim for technical note-taking
That's interesting. My problem is very similar to the issue I labelled [2] above --- where there would be more than a second of delay in interacting with some snippets.

But somehow this suggests to me that I might have been doing something wrong. I use vim+ultisnips+(your excellent vimtex) while you use neovim. Out of curiousity, do you specifically set your python provider for your neovim in your config?

mixedmath··on LaTeX and Neovim for technical note-taking
I always like people's LaTeX-based note taking setups. I'm a mathematician, so I write a lot of LaTeX too. (And I use vim, so I really like vim+Latex workflows).

It's interesting that this post (or rather, the later post that discusses this) talks about the advantages of UltiSnips. The well-known vim-LaTeX posts written by Gilles Castel (RIP) relied pivotally on UltiSnips.

It's not just that UltiSnips is a snippet engine. There are many of those (including LuaSnip, the other snippet engine mentioned in the OP series of articles). It's that UltiSnips can dispatch arbitrary expressions to short python code sections, and python has a great scientific library. For example, it's trivial to write a `sympy` snippet that will simplify or compute a given expression and write the output in latex for you.

But UltiSnips works *terribly* with neovim [1] [2]. Why? Because UltiSnips uses python, and neovim's python interface is 100x slower than vim's python interface. There are design decisions for this and I'm not trying to say that neovim is bad. I use both vim and neovim. But I use vim+UltiSnips+vimtex for writing LaTeX.

LuaSnip has interpolation too. I suppose it would be possible to write more code that calls from LuaSnip to a system like sympy (or other). But that's work. On the other hand, I think it takes a true power user to actually want or use the fancy interpolation functions.

[1]: https://github.com/SirVer/ultisnips/issues/974 [2]: https://github.com/SirVer/ultisnips/issues/1533

mixedmath··on Walter Shawlee, the sovereign of slide rules, has died
That's super cool! What are you making it out of?

I always wondered how they made the markings on the high quality slide rules of yore. Were they engraved? Were there machines that would scribe them? Now we might laser engrave, but that feels too recent. Maybe some sort of acid etching? I don't know!

mixedmath··on Ask HN: How did yall meet your SO?
I met my wife when in college.

We've had a couple of friends who met and started dating through a figure skating class (not so common, maybe --- this is also where a couple people in my wife's friend's group came from).

mixedmath··on How I'm able to take notes in mathematics lectures using LaTeX and Vim (2019)
The biggest speed gain comes from a snippet tool that can interact with a programming language. He uses Ultisnips, which can bw filtered through python.

This is probably an equivalent in emacs. Interestingly, this is more or less unusable in neovim because of how slow neovim's python interop is.

mixedmath··on Finding the Air Cannon
Ah yes, you're right! Thank you.
mixedmath··on Finding the Air Cannon
This is an unexpected programming application. It's nice that the farmer actually changed behavior after receiving the phone call.

At first, I thought there was a clear improvement. This problem essentially boils down to finding the intersection point of three circles. But it's also likely that with the small fuzz from imprecise time measurement that the three measured circles wouldn't actually intersect. I would guess that a small boost could be achieved by sampling points near the two intersection points of any two circles, but this is moot when it's just possible to brute force the whole grid.

mixedmath··on Show HN: I wished for a site with a growing list of math problems, I built it
You wanted a thing, it didn't exist, and then you built it. Kudos to you!

I don't know if part of the goal is to have a growing list of math problems and their solutions or not, but I see that mathjax is loaded to display the questions. It might be a good idea to note this and have a page where answerers can (if they choose) see how to write their responses in mathjax too.

mixedmath··on Did you already break the Elliptic Curve, Satoshi, you there?
With an unhelpful Voronoi diagram on top.
mixedmath··on BBC BASIC raytracer in 432 characters
Yeah, something like that. It's hard to be both expressive and useful.

This is a small set of primitives around a tkinter canvas. I suppose one could expose a small set of primitives around a pygame too.

I have to think hard about what exactly I would want.

mixedmath··on Z – Jump around
This seems pretty great! I love tips like this.

I'm going to try out a version of this now.

mixedmath··on BBC BASIC raytracer in 432 characters
This is interesting and serves as a potential "hook" for getting people interested in coding. I understand the BASIC appeal!

In something like python, an analogous thing is turtle graphics. Is there something more similar (but still very basic) in python for something like this? A mini graphical language?

mixedmath··on Bad NEWS, Emacs
This extra context is very informative, thanks!
mixedmath··on Bad NEWS, Emacs
I'll summarize my understanding.

A commit that changes how copying (actually "registers", which is a bit more general than copying) works in emacs was recently accepted. Now emacs opens up a minibuffer that shows what is happening, requiring one to accept the change by hitting enter or equivalent. The OP thinks this is a terrible, breaking change as it changes default behavior (and possibly without the possibility of easily configuring this away). Further, this happened without much discussion.

Let's state a vim analogy. If I want to copy the current line into my `d` register, I can type `"dyy`. This proposal would do something like, after typing `"dyy`, open up a scratch buffer that tells the user the text and the buffer, requiring a keystroke to close. This is terrible for people who understand registers (the typical vim user). But I acknowledge that sometimes I don't copy the intended text into registers and have to try again. I also know many vim people who only yank from visual mode, which has a similar show-explicitly-what-is-being-copied behavior.

The rest of this article is a description of how the OP tried to raise discussion, but the commit-author, Thierry, shot it down. Implicitly the rest of the emacs dev community is at fault too.

mixedmath··on Git Branches: Intuition and Reality
Possibly `git branch NEWBRANCHNAME` instead of `git checkout -b NEWBRANCHNAME`. When I need to show git to someone in order for them to contribute to something, I give them only these incantations --- and instructions to ask me if weird git things happen.
mixedmath··on Munich court tells Netflix to stop using H.265 video coding to stream UHD
I didn't understand from the title. But it turns out that Broadcom has pantented "high efficiency video coding" HEVC (which I have seen before as H.265). Netflix uses HEVC to stream 4K video. Broadcom sued to stop Netflix from infringing on their patent.

Presumably now Netflix will have to pay Broadcom some amount to stream over HEVC.

mixedmath··on Ask HN: Can you suggest advanced books on integral calculation?
I could suggest the following

Inside Interesting Integrals, by Nahin. This contains integrals with often arithmetic inspiration. Imagine things like, lots of special values of the zeta function or partial sums of harmonic numbers and that sort of thing.

Irresistible Integrals, by Boros and Moll. This is inspired by their work to prove all of the integrals in the enormous book of Gradshteyn and Ryzhik, whose references are often old and lacking (like Erdelyi's prior table of integrals).

You might also like Solved Problems for the Gamma and Beta Functions, Legendre Polynomials, and Bessel functions by Farrel and Ross. This is a bit closer to real analysis and veers towards more practical integral magic.

Finally, I'll note that all of these largely omit complex residue calculus (using complex analysis to solve real integrals). I don't know of a good book specifically aimed at this, unfortunately.

mixedmath··on Desalination system could produce fresh water that is cheaper than tap water
This sounded pretty strong to me, so I did a quick napkin-math check of feasibility (in short - it passed the napkin check).

On a sunny day, total solar energy hitting the top of the atmosphere gives about 1360 watts per square meter (source - top result from google, something something NASA). It takes about 4.184 joules to raise one ml of water by 1 degree celsius. Let's suppose that the "suitcase" proposed in the article has 1 square meter of space (a pretty large suitcase) and is able to capture 100 percent of solar energy (unreasonably effective). Then pure solar energy-wise, there is enough energy to raise 325 ml of water by one degree of celsius per second in a square meter. If the water is, say, at 16 degrees (the temperature of the ocean near me), in would take 84 seconds to bring 325 ml of water to boiling temperature. To transform boiling water to steam, each ml of water takes an additional 2257 joules. In 540 seconds, the 325 ml of water is now converted to steam.

In total, it has taken 624 seconds to steamify 325 ml of water (under very optimistic circumstances). Morally one could do this almost 6 times in an hour, giving approximately 2 litres of water per hour.

(Edit): Looking a bit closer, I see that the article's description of their work suggests that they recapture some of the energy from condensing the steam back into water. I didn't account for this. Even a moderate amount of recapture changes the math very favorably.

This makes me suspect that their claim of 4-6 liters per hour would require a rather large "suitcase"-sized device, but is within the ballpark of reason.

mixedmath··on Towards a new SymPy: part 2 – Polynomials
Sage uses sympy for many symbolic things (and maxima for various others). In particular, sage doesn't contain a complete reimplementation, but tries to glue these other tools together.
mixedmath··on Pysentation: CLI for displaying Python presentations
I don't quite understand. What happened in September 2021?
mixedmath··on The problem of creeping commercial surveillance (2022)
Where would one publish such an experiment?
mixedmath··on C++ Papercuts
Probably Fluent Python comes the closest, I would say.
mixedmath··on Some tactics for writing in public
I agree with these rules. I would add:

* Always assume that no one will reply to a comment. Threads of comments are at most loosely based on a theme.

mixedmath··on The L-functions and modular forms database
I've spent much of the last 7 years on work related to the LMFDB. It's very good at what it does, and is also a very good gathering place for computational arithmetic geometers, number theorists, and mathematicians.
mixedmath··on Twitter has officially changed its logo to ‘X’
Perhaps they call it X because of what comes after: why?
mixedmath··on Cost of ‘reformatting’ prompts a call for journals to change their requirements
There are a couple of journals in math that ask for the paper to be submitted using their particular latex template, and a typical latex template is incompatible with what I consider "standard" latex, i.e. either the `amsart` document class or `article` document class with certain AMS packages included.

Sometimes it's small, like whether or not `\author{my name}` needs to be included in the preamble or in the main body. These are short but annoying. Sometimes it's very annoying. I'm glad that I've never tried to publish in a two-column journal (which might exist in math? I don't know) which would require more substantial superficial edits.

I always assumed that this was a deliberate source of friction, slightly raising the bar of entry so as to discourage a certain sort of submission. I don't say I agree with this, but that's what I thought.

This sounds like the sort of problem that latex would be great at solving: changing the look of an article just by using different document classes. And sometimes it is great --- but some templates are terrible, terrible, terrible. (And sometimes these terrible templates are for great journals! I see little to no correlation there).

← PreviousPage 2 of 9Next →