svalorzen's comments

svalorzen | 1 year ago | on: Compile-time JSON deserialization in C++

The problem with this is that it will not actually parse double in IEEE 754, as you will accumulate inaccuracies at every step of the loop. In theory, when parsing a float, you are supposed to return the floating point that is closest to the original string number. Your code will not do that. Even if you accept the inaccuracy, if you for some reason load the JSON using a runtime library, you'll get different numbers and consequently and result that depend on those numbers. For my use-case this was not acceptable unfortunately..

svalorzen | 1 year ago | on: Compile-time JSON deserialization in C++

I recently actually tried to do a very similar thing, although a bit tighter in scope. What stopped me what that actually deserializing floating points cannot currently be done at compile time; the only utility available to do so is `from_chars` and it is only constexpr for ints.

I did not see any mention of this in the post; so are you actually simply extracting the string versions of the numbers, without verifying nor deserializing them?

svalorzen | 1 year ago | on: Earth rotation limits in-body image stabilization to 6.3 stops (2020)

I mean, surely if you are doing something that requires this level of precision, you could just ask the user to input its current known location? I doubt that even if the user misdialed by ten or twenty meters the difference in compensation would matter (or even if the camera was actually moving around).

svalorzen | 2 years ago | on: Welcome to Wikifunctions

Also, in case anyone is interested, the uninformative Jeffreys prior for this in Bayesian statistics (meaning it does not assume anything and is invariant to certain transformations of the inputs) is Beta(0.5, 0.5). Thus the initial guess is 0.5, and it evolves from there from the data.

svalorzen | 2 years ago | on: Moving fast with the core Vim motions

There is a Vim plugin called EasyMotion, which I absolutely love, which when invoked creates a simple 1 or 2-key "checkpoint" at the start of every word on your screen, and super imposes them on the text. Then it's only a matter of looking at the point where you wanted to move, and press the two keys written there, and there you are!

It's also fairly customizable in that you can specify which characters are actually allowed (so you don't end up with very weird keys to press), and some other stuff. So every time I need to move somewhere I can't be bothered to figure out the standard keys it would take me to get there, it saves me.

svalorzen | 3 years ago | on: ‘Breakthrough’ obesity drugs that have stunned researchers

> No, not necessarily. Several studies have shown that different people can get different amounts of energy out of the same food, depending amongst others on their gut micro biome, though stress also seems to play a role. It’s never going to be that simple.

Sure, so they just need to compute their at-rest calorie consumption differently, and from there the rest is the same.

> Conventional thermodynamics don’t work when you consider a full human, which is a very out-of-equilibrium and not-isolated system. Conservation of energy does not tell you anything about the efficiency of the energy extraction process.

This is like saying that even if you don't refuel your car it will never stop, because different cars have different mpg ratings. A human is indeed a closed system when you consider the works it outputs and the calories it ingests, unless I somehow missed a newfound capacity for photosynthesis. The fact that it might be a bit harder to compute calorie requirements than what might be naively done does not allow you to just dismiss everything else.

svalorzen | 3 years ago | on: ‘Nasty’ geometry breaks decades-old tiling conjecture

Hasn't your bet already been beat in concept by https://en.wikipedia.org/wiki/L%C3%A1szl%C3%B3_Polg%C3%A1r ?

He is a chess teacher who decided to train his daughters in chess from a very young age. What do you know, two of them became the first and second best players, with the best being considered the best woman chess player of all time. Unlikely that they somehow just all got chess genius "genes" from him.

It really does seem that heavy investment from a young age by a good teacher can work wonders.

svalorzen | 3 years ago | on: The genius of binary space partitioning in Doom (2019)

I thought about this for a bit, and I have a feeling that as long as everything is touching the ground, then making covering loops is impossible, and so there exist a simple ordering you can compute.

The ordering is as follows: I'm assuming the isometric rendering of a map as a 45 degrees tilted square, and I'm only considering tile ordering just for simplicity but it should generalize fine. The uppermost tile is where you want to start rendering. From there, you render following the two 45 degree diagonals until you are done (so you don't only look at the y axis). Once this is done, you restart the process from the tile just below the uppermost corner, and so on. This ordering makes sure that all rectangular objects that are aligned with the 45 degree diagonals are rendered correctly.

Now you need an additional trick to render rectangular objects that are transversal to those diagonals correctly. What you do is you keep track of the boundaries of all such objects, so that the rendering loop described above can tell when it encounters one. Once it encounters it, it pauses rendering the current diagonal and considers it temporarily complete. The diagonal on the other side still needs to be rendered fully though --- or at least as far as possible with the same stopping condition. The next rendering pass will likely at some point re-encounter the same transversal object, just at a further point. Stop again, start the next diagonal. Once the rendering encounters the lowest and last part of the transversal object, then that object can be rendered, and the first stopped diagonal can be resumed (and after this resume all the paused diagonals in order).

This should always give you the correct order to render everything without errors. Let me know if this made sense, otherwise I can try to clarify.

svalorzen | 3 years ago | on: GDPR and the Lost Generation of Innovative Apps

We document that the ban on dumping dioxins in rivers has induced the exit of a number of chemical plants; and following implementation entry of dangerous chemical handling facilities fell by half. Whatever the health benefits of banning dioxins, they come at substantial costs of forgone innovation.

svalorzen | 4 years ago | on: The hardest program I've ever written (2015)

I'm not sure I understand why dynamic programming wouldn't work (and the author explicitly mentioned Knuth). Tex's main job is literally doing line breaks, which is the exact same problem being tackled here. I would expect a similar approach (progressively build a graph of the most promising breaking points) to be effective. Why wouldn't it be the case here?

svalorzen | 4 years ago | on: Ask HN: Who wants to collaborate?

Hi, I'm the author of a C++ library focused on tabular bandits, mdps and pomdps. It's called AI-Toolbox, and it's one of the largest non NN libraries out there.

The library is fully documented, but the text is probably a bit dry. I'd love for somebody to help me improve its accessibility, and I'd be willing to help them along learning how things work.

My email is my nickname and Gmail, feel free to reach out if you are interested.

svalorzen | 4 years ago | on: Naomi Wu video demonetized on YouTube

When you look at something like Borat's swimming suit, it is ridiculed specifically because it is sexualized. However, for men that swimming suit generally results in a negative sexual interest, and it's why you hardly find men wearing it. In gay parades you find plenty of men wearing ultra tight shorts, specifically because they sexualize. How can't they? They are specifically designed to highlight the genital areas.

As a second point about breasts, human breasts are unique in the animal kingdom because they are specifically made to signal sexual availability. Generally animals do not have enlarged breasts, even when lactating. In humans the woman breast evolved to enlarge when sexual maturity is reached to signal sexual availability. So saying that boobs are just a body part that men sexualize is also incorrect.

svalorzen | 4 years ago | on: Pull Requests vs. Pair Programming

Not an English native as well, but in my language it works in the same way. "My" is used to designate possession of the set, not of the individuals. I don't own "my friends" as a slave owner, they are "my friends" because that is my personal set of friends among all possible sets of people.

svalorzen | 4 years ago | on: How I debate

What I realized after many long discussions with my friends is that the largest discrepancies in opinions often originate from a simple different assumption. The difficult part is discussing long enough to figure out what that assumption is, since it's usually so fundamental (for both parties) to the whole belief that you have to spend a long time arguing about the "obviously" wrong statements of the other person.

When you figure what the assumption is, it's basically guaranteed to make you agree with each other: "Ah, but so you believe A! Of course you'd argue for A' then, makes total sense now!" It's then much easier to find compromises since you can work on the small thing below rather than the whole scaffold built on top.

Unfortunately I haven't yet found a way to easily discover what the differing assumption is aside from lengthy debates. This makes finding compromises with people harder as you can only discuss in depth with people where you can trust that they are truly arguing in good faith.

svalorzen | 4 years ago | on: Greedy AI agents learn to cooperate

I maintain a repository of many implementations of classical (tabular) RL algorithms [1] which you might enjoy playing with when starting out. I use it for both research and for student projects. The advantage of avoiding NNs when starting out is that it is much simpler to inspect the inner workings of an algorithm to see whether it's working or not.

I'm always happy to help if something is unclear or difficult so feel free to open issues there :)

[1]: https://github.com/Svalorzen/AI-Toolbox

page 1