HNHacker News
TopNewBestAskShowJobs

martincmartin

7,330 karma · joined May 12, 2008

Enjoying life.
submissionscomments
martincmartin··on Claude's new rules against game cloning won't stop the AI copying boom
"Anthropic’s new prompt comes as AI coding tools are powering a deluge of game projects based on existing work in one way or another. That includes thrown-together copies of game demos that are making some developers afraid to show their early work publicly, as well as thousands of AI-powered decompilation and porting projects for retro games. Thanks to AI tools, what used to be a time-consuming process requiring painstaking human effort is now orders of magnitude more efficient (though some veteran coders complain that these vibe-coded ports and decomp projects fail to clear the same quality bar as human-centered efforts)."
martincmartin··on Wealth Inequality in America drawn to scale
“Democracy is the theory that the common people know what they want, and deserve to get it good and hard.” -- H.L. Mencken
martincmartin··on What California is learning from solar panels built over irrigation canals
Put the solar panels in a field

They paved paradise, put up a solar array.

The supports in the picture are massive and don't look cheap.

They're load-bearing.

martincmartin··on The Quantum Butterfly Effect
How does this interact with the No Cloning Theorem? https://en.wikipedia.org/wiki/No-cloning_theorem

If you can rebuild the cQbit from just the bath, then there's no information in cQbit, right?

martincmartin··on I found a 55 year old bug in the first Lunar Lander game
OP here. Yes, that's what I meant. Using the rocket equation, truncated Taylor series approximation, truncating even more to make things solvable, then iterating to improve the solution, were all things I wouldn't have expected.
martincmartin··on I found a 55 year old bug in the first Lunar Lander game
OP here. Cool! I was born in 1969, less than a month before Neil Armstrong walked on the moon, and was only a few months old when this game was written. I too learned BASIC, then spent hours pouring over the book "BASIC Computer Games", before I even had a computer of my own. Fond memories, as you say.
martincmartin··on I found a 55 year old bug in the first Lunar Lander game
Yeah, I think we're agreeing. :)

So it turns out, before discovering the bug, I actually wrote code to find the optimal sequence when your choices are restricted to integers. I thought, along the same lines as you, "maybe if you burn 165 or 170 or something in the first non-zero term, then you could burn less on the 14 turn and still land."

And this is how I know it's not possible, at least with integer burn rates. :) I checked all 201^9 combinations, with a few optimizations to cut down the search space.

That's different than what you said, of using floating point for the last burn. But it is in a similar spirit.

martincmartin··on I found a 55 year old bug in the first Lunar Lander game
I thought it was a little odd that he mentioned "impressive for a high school senior in 1969" multiple times throughout -- honestly I would imagine that growing up in the Space Age would have had a massive influence on technically minded folks, reminds me of that movie from a while back called October Sky.

OP here. I see your point. But think of what's needed to create this game:

- From high school physics, you know to start with a free body diagram. There are two forces, gravity and thrust. So far, your average high school student with an A in physics should be able to do that.

- Gravity depends on the distance to the center, which of course is changing, that's the whole point of a lander. I mean, you start 120 miles up. You have to realize it doesn't change much, so can be approximated as a constant. But you've been exposed to that in physics class, so maybe you just assume it's a constant.

- How the hell does thrust work as a function of burn rate? Is the exhaust velocity higher when you burn more? In other words, considering 100 lbs/sec vs 200 lbs/sec, when you double the flow of fuel into the engine, and then you burn it, it turns into twice as much fuel in the same volume. Wouldn't it be forced out at twice the speed? Or at least a higher speed? Maybe you think of the universal gas law, PV=nRT. The volume is constant (the volume of the engine), n is doubled, R is a universal constant. So that means P or T changes, or both. Why is T, which is a function of the velocity of the molecules, constant why P is doubled? Why don't both change?

- So you talk to your Dad, who happens to be a physicist. Most high school students, even those getting an A in physics, don't have a physicist for a father who can look up the properties of rocket engines and find the Tsiolkovsky rocket equation. So a high school senior finding the rocket equation is impressive to me.

- To go from velocity to position, you need to integrate. I'm not sure your average A physics senior would think of replace the FLOG() call with a Taylor series and integrating it term by term.

- How many terms of the Taylor series do you need? Does it even converge for you? If he thought of these subtleties, that's impressive. But it's possible that young Jim didn't realize these issues and just uses 5 terms because that seemed like a lot of terms.

- So now you can simulate it in near the moon. Cool! But how do you detect when it hits the ground? You could try to solve for altitude equals zero, and see if there are zero or more solutions. But even if there are solutions, they might be in the past or the future. So instead you decide to look where the velocity is zero, since you know this happens exactly once during the turn. I think that shows some ingenuity there, although I don't know if that was 18 year old Jim's thought process.

- So you try to invert the rocket equation: given a desired delta-V, how much fuel do you need to burn to achieve it? If you try this with pencil and paper and high school math, including Calculus, you keep getting stuck. You don't have the tools to show that it's actually impossible and needs you to introduce a new function, the Lambert W.

- So maybe you give up, or maybe your physicist Dad helps you again. Using your Taylor series, you now have to solve a 5th degree polynomial. So you decide to scrap the 3rd, 4th and 5th term to get yourself a quadratic. Why is it ok to scrap these now, when it wasn't ok when computing the regular dynamics? I'm impressed that he realized he can use different levels of approximation in different circumstances, without it generating some inconsistencies or other problems.

- You somehow figure out how to use the alternate form of the quadratic equation, which means you didn't just look it up and type it in. Possibly impressive.

martincmartin··on I found a 55 year old bug in the first Lunar Lander game
The nature of the bug is that it has trouble finding when the lander has touched the surface. You need to have an altitude of less than zero for around 0.05 seconds for the game to notice that you've landed. If your thrust during that time is 200 or 199, to have an altitude < 0 for that long, then you need to have a speed greater than 1 MPH when your altitude is zero.

Even when the bug is fixed, the code is still only approximating the lowest point. Also, even when it detects that you've landed, now it needs to compute the time when you land, i.e. when the altitude is zero, not velocity. It also uses an approximation for that.

So the times will be a little off. If you're burning 200 or 199 during that last time step, you have a high acceleration so even a small amount of time turns into a large amount of velocity. Instead, if you're burning say 10 lbs/sec, then being off by say 0.08 sec won't change your velocity much.

martincmartin··on I found a 55 year old bug in the first Lunar Lander game
OP here. True, I oversimplified. What I meant was, there are two parts to the dynamics, the rocket equation and gravity. They add linearly, so any extra velocity that comes from gravity needs to be eliminated by increasing the delta V from the rocket equation. The gravity delta V is just acceleration of gravity times time, so you want to minimize the time. Surprisingly (to me), in the rocket equation, it doesn't matter how long it takes, or what sequence of burns you use, or whether you burn at a constant rate all the way through vs short strong bursts, etc. So to land with zero velocity using the least fuel, you just need to land in the shortest amount of time.
martincmartin··on I found a 55 year old bug in the first Lunar Lander game
True. + also has higher precedence than -, so that a - b + c means a - (b + c).
martincmartin··on I found a 55 year old bug in the first Lunar Lander game
Thanks. Fixed!
martincmartin··on I found a 55 year old bug in the first Lunar Lander game
OP here. One interesting thing about FOCAL is that * has higher precedence than /. So in Lunar Lander, M*G/Z*K is what mathematicians and other languages would write M*G/(Z*K). I did a double take when I first saw that. :) As the Wikipedia article says, "This can cause subtle errors when converting FOCAL source code to other systems."

Also, the IF syntax is a little limiting and hard to read, although I suppose programmers would get used to it.

martincmartin··on I found a 55 year old bug in the first Lunar Lander game
OP here (of this blog post, not the original game). The naive way is what I expected too, and described as the Euler method in the post.

In terms of physical accuracy, especially when you get near the surface, the mass does change significantly if you have a high rate of fuel burn. But in terms of how challenging/fun it would be, and what strategies you use as a player, I doubt it would make much difference. In fact, there are other lunar lander simulations in the BASIC computer games book, I think one of them does use the naive approach.

If 10 seconds is too long, you could still leave that as the turn in the UI, but internally break each turn into a bunch of smaller time steps, e.g. 10 time steps of 1 second each. Actually, the existing game does that in certain places, which is why his physics simulation takes in an arbitrary time S rather than always the full 10 seconds.

martincmartin··on The Rate of Return on Everything, 1870–2015 (2019)
$82,098 in 1955, adjusted for inflation, was worth $727,502.05[1]. So homes were actually much more expensive back then.

[1] https://data.bls.gov/cgi-bin/cpicalc.pl?cost1=82098&year1=19...

martincmartin··on Ottawa wants the power to create secret backdoors in networks for surveillance
The Economist had an article about this last week:

https://www.economist.com/science-and-technology/2024/05/17/...

(Accompanying editorial: https://www.economist.com/leaders/2024/05/23/hacking-phones-...)

martincmartin··on A fourteen-day free trial ain’t gonna cut it
If you click on their username, it takes you to their profile.

https://news.ycombinator.com/user?id=simonsarris

which says:

I make GoJS, a powerful canvas-based diagramming library:

http://gojs.net/

Which is not what I think of a graphing (time series, x-y points joined by lines), but otherwise seems relevant to their comment.

martincmartin··on Deaths at a California skydiving center, but the jumps go on
Isn't actually collecting judgements hard? I thought I read, in some article about how Alex Jones hasn't paid any of his judgement, that it's not uncommon to take decades before seeing any money. Often people settle for a greatly reduced sum that they can get right now, for that very reason.
martincmartin··on Realtime telemetry from ISS internal components
True. It turns out, it also applies for the two body problem, as long as one body is much more massive than the other.

https://en.wikipedia.org/wiki/Orbital_period#Small_body_orbi...

martincmartin··on Realtime telemetry from ISS internal components
In a uniform gravitational field, it isn't. On the earth's surface, acceleration due to gravity is 9.8 m/s^2, independent of the mass of the falling object. See Galileo's Leaning Tower of Pisa experiment.

https://en.wikipedia.org/wiki/Galileo%27s_Leaning_Tower_of_P...

martincmartin··on A mathematician who finds poetry in math and math in poetry
What examples would you suggest?
martincmartin··on X becoming a 'ghost town' of bots as AI-generated spam content floods internet
Used to be - 90% of replies were from normal people. Nowadays, it is just 90% bots in all replies.

This reminds me of the saying that 90% of statistics are completely made up.

martincmartin··on New car buying guide: the algorithm (2021)
An economist literally won a Nobel prize for answering that: https://en.wikipedia.org/wiki/The_Market_for_Lemons

When you buy a used car, even one that's less than a year old, you have no way of knowing if there's something wrong with it. So buyers offer lower prices. Then a seller who has a car that they know is good says "I'm not selling it for such a low price, I know it's worth more." So the only people who sell used cars are the ones where something is wrong with them. A kind of race to the bottom.

martincmartin··on Private company landing on the moon today
But observations need powerful domestic telescopes. If you're NASA, you own and have access to them.
martincmartin··on Private company landing on the moon today
Might be about reproductive rights and abortion.
martincmartin··on Ask HN: Where can I find good legal documents?
I've had luck with Nolo legal documents, for things like a simple will when I was young and my estate was simple.

https://www.nolo.com/

martincmartin··on James Webb Space Telescope captures high-resolution image of Uranus
My Ph.D. work was on a robot called Uranus. Let's just say it was the butt of many jokes. Like when my advisor was fixing it once, and I said "get your head out of Uranus!"

https://www.cs.cmu.edu/~gwp/robots/Uranus.html

martincmartin··on "I just bought a 2024 Chevy Tahoe for $1"
Is this a reference to something? Other than Bobby Tables. Google can't find anything.
martincmartin··on Bash one-liners for LLMs
What are the pros and cons of llamafile (used by OP) vs ollama?
martincmartin··on What is a zero refractive index material?
No need to dig out the books, they're available online, well formatted and a pleasure to read:

https://www.feynmanlectures.caltech.edu/

https://www.feynmanlectures.caltech.edu/II_32.html

Page 1 of 23Next →