HN user

mvanaltvorst

361 karma

mauritsvanaltvorst.com

Posts5
Comments92
View on HN

Jax-metal on Apple M-series GPUs is barely useable in my opinion. It's not possible to invert a matrix, for example, because Apple has not implemented the necessary triangular solve operator. It's also not possible to sample points from a normal distribution, because the Cholesky decomposition operator is not yet implemented. Apple hasn't responsed to both of these issues for the past year. It's difficult to take a numerical computing framework seriously if one cannot invert a matrix.

[1] https://github.com/google/jax/issues/16321 [2]: https://github.com/google/jax/issues/17490

Not necessarily if you get rid of the energy in another way, right? You could perform hydrolysis to turn water into hydrogen + oxygen, and if you release hydrogen into the atmosphere it will just escape our atmosphere into space.

It's naive to think you can compare vectors without any sort of prior on what this relationship might look like. Hoeffding's D cannot effectively capture relationships between time-shifted series that the (generalised) cross correlation can. Nor can it identify patterns in conditional heteroskedasticity. You will always need to impose some sort of prior when comparing vectors, and Hoeffding's D is rarely the best choice.

In my experience, PyMC leads to models that are orders of magnitudes slower than equivalent models written in JAGS. Profiling is also extremely tedious, and there is no section in the PyMC docs that touches upon model performance.

I really like PyMC's API, but as soon as you move towards bigger datasets JAGS or Stan seem to be the only practical options.

TimeGPT-1 3 years ago

I immediately tried to find a comparison with ARIMA as well and was disappointed. It's difficult to take this paper seriously when they dismiss a forecasting technique from the 70's because of "extensive training times".

Newton's method is an algorithm you can use to minimise/maximise/find the root of a differentiable function very quickly if you start with a reasonable guess. There are many variants on Newton's method, e.g. BFGS that does not require the hessian (/2nd order derivative) of the function. A pitfall of Newton's method is that it does not find the global minimum per se, it might just converge to a local minimum if this local minimum is "closer" to your initial guess. Some variants of Newton's method allow you to avoid this pitfall, but they are slow in practice.

This seems to be another variant that claims to find the global minimum quicker than other existing methods. I am not experienced enough to verify this claim. I am also not sure how this new algorithm performs in practice; in theory, ellipsoid methods are a lot more efficient than simplex methods for optimising convex functions, while in practice simplex methods are usually an order of magnitude faster. So take this result with a grain of salt.

Statisticians and mathematicians call them dimensions, machine learning engineers call them "features". Statisticians and mathematicians usually interpret observations as vectors in n-dimensional space, which leads to some interesting geometric results. Hence the term dimension, we do mathematics with them as if they were actual points in some high-dimensional space. Degrees of freedom are something a bit more nuanced that are of use when you start to do specific statistical tests, and they do not have to be exactly equal to your amount of dimensions.

I wish Terraform were less opinionated. It has a very clear set of rules you have to adhere to, and if you try to do anything remotely complex you will encounter barriers left and right.

An example is the fact that `for_each` is not supported on providers [1], an issue with 230 likes which has not been solved since January 2019. This had me resort to a Python script which generates a `.tf.json` file, definitely not ideal. Infrastructure as code sounds great, but in practice it's closer to "infrastructure as a non-standard markup language".

[1] https://github.com/hashicorp/terraform/issues/19932

Yes, this would work. Hard to reason about LP solvers in complexity notation, but would probably be pretty quick.

You could also construct a graph, where every price is a node. Start at 0.00, and do a BFS until you find the desired price. Worst case scenario O(n) where n is the desired price. Could be optimised by using a path finding algorithm like A*, its heuristic would make it try a greedy algorithm at first and then do a more complex solve at the end.

Another possibility is by memoization (dynamic programming). Strictly worse than the graph algorithm in complexity terms, but in practice your computer is very good at working sequentially on a very big array of booleans.

Really many different approaches to solve this problem. In this specific case greedy worked as well.

This feels like it should be illegal. Just by random chance there will be a point in time where enough tenants ask their deposit back at the same time, and you enter one big economic crisis. Of course, banks also have this risk of a bank run, but the difference is that big banks are tightly regulated and have a strict reserve rate they have to abide to (usually >5%). I wouldn't trust a big population of landlords who manage their own finances, and have a big incentive to cut corners.

If anyone knows a method to short Korean housing, please let me know!

Personally, I find that Discord feels extremely bloated compared to almost any other program on my computer. Probably has to do with the fact that Discord has still not released a native ARM version of its client for the Apple M1. Nearly a year after its release there really is no excuse for any Electron application to stick to x86_64+Rosetta 2.

Discord is literally the only x86 application that is still installed on my MacBook Pro M1.

Competitive programming is fun and trains quick and accurate problem solving. You can critique the fact that modern programming interviews seem to be too focused on short leetcode problems, but that is an entirely different field than competitive programming.

"Mathematical textbook problems are useless, because scribbling mathematics in a notebook is not best practice! Real mathematicians exclusively spend their time writing academic papers."

The birthday paradox and the algorithm are not related; the birthday paradox is simply the phenomenon that even though there are several orders of magnitude more hashes than images in ImageNet, it is still likely that collisions exist.

The algorithm sounds like a simple tree search algorithm. Let's consider the naive case: traverse all images, and keep a list of hashes you have already visited. For every extra image, you have to traverse all previous n hashes you have previously computed. Naively doing this check with a for loop would take O(n) time. You have to do this traversion for every image, therefore total time complexity is O(n^2).

Fortunately, there is a faster way to check whether you have found a hash before. Imagine sorting all the previous hashes and storing them in an ordered list. A smarter algorithm would check the middle of the list, and check whether this element is higher or lower than the target hash. When your own hash is higher than the middle hash, you know that if your hash is contained within the list, it is contained in the top half. In a single iteration you have halved the search space. By repeating this over and over you can figure out if your item is contained within this list in just log_2(n) steps. This is called binary search. Some of the details are more intricate (e.g. Red-Black trees [1], where you can skip the whole sorting step) but this is the gist of it.

This all sounds way more complicated than it is in practice. In practice you would simply `include <set>;` and all the tree calculations are done behind the scenes. The algorithm contained within the library is clever, but the program written by the author is probably <10 lines of code.

[1] https://en.wikipedia.org/wiki/Red–black_tree

What role does Akamai Edge DNS play in normal internet traffic? DNS responses usually get cached, as far as I understand correctly. And it is usually possible to change your DNS server to e.g. Google's and circumvent the outage. Does Akamai Edge DNS play a role on the server side?

If you have $100M worth of carbon captured from the air stored somewhere under the ground, how do you make sure nobody takes advantage of this vast supply of energy?

You will have to deal with this problem either way, going straight to the Saudi Arabian oil operator just skips the middleman.

As a sidenote, does anyone know whether something like an "optimal" Qi charging wattage exist, as in highest efficiency? Power lost due to resistance increases with current squared. Therefore I would imagine charging <5W would be best for high efficiency. However, Qi is based on quickly alternating magnetic fields. Does the circuitry involved make Qi charging inefficient once the power gets low enough? Or is Qi charging at 0.1W preferable over 2.5W?

Wondering whether iOS 14.7 also unlocks reverse Qi for other devices, e.g. AirPods. People previously assumed that there was a piece of circuitry missing for reverse charging, but this product disproves that.

Goes to show how much you can get out of hardware just by writing code sensibly in a native language (and native libs/tools, of course).

Personally, I find this a far less impressive demo of the SuperH SH-4 CPU than, say, Doom running on a graphical calculator. A http server (not https) simply opens sockets, writes a string, and closes the socket, a task which is usually purely I/O bound. Implement something basic like HTTPS (introduced in 1994) and watch this CPU grind to a halt.

I do not understand how hiding private items from the camera breaches your privacy. That is like saying you have already died of thirst because you have to drink water; the preventive measure does not cause the thing it tries to prevent.

Furthermore, you do not have to take the exam in your own room. Any quiet room where there are no other people is theoretically fine. Having access to such a room is your own responsibility, just like having access to a laptop to do your study is your own responsibility. In practice, hiding private items in your study room is usually the most practical way to get access to a comfortable room, but I do not believe requiring students to have access to a private room for 2 hours breaches their privacy.

Me and my roommate are first year undergraduate students. We do different bachelors; I have taken all my tests this year with online proctoring, my roommate has had all his tests without online proctoring.

The proctoring process is actually pretty simple: I have a Google Chrome extension installed that I enable when I have to take an exam. It takes 5 extra minutes before the exam: I have to show my identification, the materials I'm using on my desk, my ears to check whether I'm using wireless earphones, and do a quick sweep around the room. It records my screen, my webcam, and my microphone. Of course, the system is not fool proof (I've heard some students use post-its on their display), but communicating with other students becomes nearly impossible.

My roommate is actually jealous of my proctoring. He does not cheat, but knows most others in his year do. There are groups of students who meet up and take exams with each other. As a result, some of his peers consistently get higher grades, while my roommate clearly put in more effort and is more capable of achieving a high grade on his own. Because the barrier to cheating is so low, it almost becomes a requirement to cheat if you want to achieve grades that are high relative to your peers.

I do not believe proctoring is a breach of my privacy. Google Chrome's sandbox is good at explaining what information the extension is requesting, and when it is turned on. Chrome's battle-tested sandboxing makes me confident that the extension is not snooping through my files, for example. It only sees my screen. I can hide things I do not want the online proctor to see before the exam starts. Similarly with my room, you can hide everything that would breach your privacy before the exam starts. Of course, online proctoring is invasive, but I believe students should think more carefully about the dilemma our teachers are facing. Lack of online proctoring discourages smart students, discourages learning, and hurts the reputation of the university in the long term with unreasonable diploma's. This pandemic requires flexibility from everyone, and simply crying "privacy" without considering both sides is short-sighted. The data recorded for online proctoring is reasonable, and does not bring us closer to any kind of "big brother" scenario.

You could also say Python is pure overhead. You can write any Python programme in C, but more efficiently! C is faster, and therefore better.

This article avoids the fact that declarative programming has proven to be more pleasant for most people. And React simply is fast enough for most use cases, even though it has a performance penalty compared to Svelte. The virtual DOM is an elegant optimisation that usually works well in the real world, and methods like `shouldComponentUpdate()` can be used in the 1% of cases where the default is not fast enough.