Live data from Hacker News

Andrej Karpathy: Software in the era of AI [video]

youtube.com

791–800 of 827 posts

Re: Andrej Karpathy: Software in the era of AI [video]

#791

Earlier quoted context omitted.

I am actually working on building a semantic TypeScript server right now. It's going really good, check it out. https://github.com/screencam/typescript-mcp-server

With your tool can I hook it up to Cursor and just have it use it?

I’ve only used it with Claude code

I did a post in Show HN where you can see the installation instructions. I would put them here, but ware on the iPad. It’s an MCP server so it should work. I would’ve thought cursor and other IDs would have some type of sytactic analysis built-in

Re: Andrej Karpathy: Software in the era of AI [video]

#792
post #724

Earlier quoted context omitted.

You’re right about the trees but wrong (hear me out) about the forest. Yes, programming isn’t always deterministic, not just due to the leftpad API endpoint being down, but by design - you can’t deterministically tell which button the user is going to click. So far so good. But, you program for the things that you expect to happen, and handle the rest as errors. If you look at the branching topology of well-written c…

Programmers aren't deterministic either. If I ask ten programmers to come up with a solution to the same problem, I'm not likely to get ten identical copies. Different programmers, even competent experienced programmers, might have different priorities that aren't in the requirements. For example, trading off program maintainability or portability over performance. The same could apply to LLMs, or even different runs…

> Programmers aren't deterministic either.

No but programs are. An LLM can be a programmer too, but it’s not a program the way we want and expect programs to behave: deterministically. Even if a programmer could perform a TLS handshake manually very fast, ignoring the immense waste of energy, the program is a much better engineering component, simply because it is deterministic and does the same thing every time. If there’s a bug, it can be fixed, and then the bug will not re-appear.

> If I ask ten programmers to come up with a solution to the same problem, I'm not likely to get ten identical copies.

Right, but you only want one copy. If you need different clients speaking with each other you need to define a protocol and run conformance tests, which is a lot of work. It’s certainly doable, but you don’t want a different program every time you run it.

I really didn’t expect arguing for reproducibility in engineering to be controversial. The primary way we fix bugs is by literally asking for steps to reproduction. This is not possible when you have a chaos agent in the middle, no matter how good. The only reasonable conclusion is to treat AI systems as entirely different components and isolate them such that you can keep the boring predictability of mechanistic programs. Basically separating engineering from the alchemy.

Re: Andrej Karpathy: Software in the era of AI [video]

#793

Earlier quoted context omitted.

> Karpathy is consistently one of the clearest thinkers out there. Eh, he ran Teslas self driving division and put them into a direction that is never going to fully work. What they should have done is a) trained a neural net to represent sequence of frames into a physical environment, and b)leveraged Mu Zero, so that self driving system basically builds out parallel simulations into the future, and does a search on…

Aren't continuous, stochastic, partial knowledge environments where you need long horizon planning with strict deadlines and limited compute exactly the sort of environments muzero variants struggle with? Because that's driving. It's also worth mentioning that humans intentionally (and safely) drive into "solid" objects all the time. Bags, steam, shadows, small animals, etc. We also break rules (e.g. drive on the wro…

I didn't say use Mu Zero end to end, I said leverage it.

This is how I would do it:

First, you come up with a compressed representation of the state space of the terrain + other objects around your car that encodes the current states of everything, and its predicted evolution like ~5 seconds into the future.

The idea is that you would leverage physics, which means objects need to behave according to laws of motion, so this means you can greatly compress how this is represented. For example, a meshgrid of "terrain" other than empty road that is static, lane lines representing the road, and 3d boxes representing moving objects with a certain mass, with initial 6 dof state (xyz position, orientation), intial 6dof velocities, and 6 dof forcing functions with parameter of time that represent how these objects move.

So given this representation, you can write a program that simulates the evolution of the state space given any initial condition, and essentially simulate collisions.

Then you divide into 3 teams.

1st team trains a model to translate sensor data into this state space representation, with continuous updates on every cycle, leveraging things like Kalman filtering because of the correlation of certain things that leads to better accuracy. Overall you would get something where things like red brake lights would lead to deceleration forcing functions.

(If you wanted to get fancy, instead of a simulation, you build out probability space instead. I.e when you run the program, it would spit out a heat map of where certain objects are more likely to end up)

2nd team trains a model on real world traffic to find correlations between forcing functions of vehicles. I.e if a car slows down, the cars behind it would slow down. You could do this kinda like Tesla did - equip all your cars with sensors, assume driver inputs as the forcing function, observe the state space change given the model from team 1.

3nd team trains a Mu Zero like model given the 2 above. Given a random initial starting state, the "game" is to chose the sequence of accelerations, decelerations, and steering (quantized with finite values) that gets the highest score by a) avoiding collision b) following traffic laws, c) minimizing disturbance to other vehicles, and d) maximizing space around your own vehicle.

What all of this does is allow the model to compute not only expected behavior, but things that are realistically possible. For example, in a situation where collision is imminent, like you sitting at a red stop light, and the sensors detect a car rapidly approaching, the model would make a decision to drive into the intersection when there are no cars present to avoid getting rear ended, which is quantifiably way better than average human.

Furthermore, the models from team 2 and 3 can self improve real time, which is equivalent to humans getting used to driving habits of others in certain areas. You simply to batch training runs to improve prediction capability of other drivers. Then when your policy model makes a correct decision, you build a shortcut into the MCTS that lets you know that this works, which then means in the finite time compute span, you can search away from that tree for a more optimal solution, and if you don't find it, you already have the best one that works, and next time you search even more space. So essentially you get a processing speed up the more you use it.

Re: Andrej Karpathy: Software in the era of AI [video]

#794

Earlier quoted context omitted.

> Karpathy is consistently one of the clearest thinkers out there. Eh, he ran Teslas self driving division and put them into a direction that is never going to fully work. What they should have done is a) trained a neural net to represent sequence of frames into a physical environment, and b)leveraged Mu Zero, so that self driving system basically builds out parallel simulations into the future, and does a search on…

I don't think that would have worked either. But if they'd gone for radars and lidars and a bunch of sensors and then enough processing hardware to actually fuse that, then I think they could have built something that had a chance of working.

Think about this. If I give you GTA 5 traffic in single player with only NPC drivers, could you manually write a policy that gets a player from point a to point b in a car, assuming you have in game positions of all cars?

Re: Andrej Karpathy: Software in the era of AI [video]

#795

Earlier quoted context omitted.

At a speed that feels completely seamless to navigate through. Yeah, I'm pretty impressed by that.

Read the code that is actually being generated. It's only the content of the page, which itself is loaded progressively. It takes 2 seconds to generate an extremely basic 300 characters page of content. Again, what is impressive here? It's not fast, it gives the illusion of being fast.

I know what it's doing and I'm impressed. If you understand what it's doing and aren't impressed, that's cool too. I think we just see things differently and I doubt either of us will convince the other one to change their mind on this

Re: Andrej Karpathy: Software in the era of AI [video]

#796
post #87

Earlier quoted context omitted.

Because any precise description of what the computer is supposed to do is already code as we know it. AI can fill in the gaps between natural language and programming by guessing and because you don't always care about the "how" only about the "what". The more you care about the "how" you have to become more precise in your language to reduce the guess work of the AI to the point that your input to the AI is already…

With vibe coding, I am under the impression that the only thing that matters for vibe coders is whether the output is good enough in the moment to fullfill a desire. For companies going AI first that's how it seems to be done. I see people in other places and those people have lost interest in the "how"

Which is fine in general. It has been a selling point for SQL or C, for example. What I wanted to say is that for AI output becoming a replacement for code, a necessary requirement is that the output becomes deterministic. While LLMs provide that technically, I am not sure the "culture" that has evolved the technology will lead to product that provide determinism.

Re: Andrej Karpathy: Software in the era of AI [video]

#798

Earlier quoted context omitted.

This is why I call all this AI stuff BS. Using a formal language is a feature, not a bug. It is a cornerstone of all human engineering and scientific activity and is the _reason_ why these disciplines are successful. What you are describing (ie. ditching formal and using natural language) is moving humanity back towards magical thinking, shamanism and witchcraft.

> Using a formal language is a feature, not a bug. It is a cornerstone of all human engineering and scientific activity and is the _reason_ why these disciplines are successful A similar argument was also made by Dijkstra in this brief essay here [1] - which is timely to this debate of why "english is the new programming language" is not well-founded. I quote a brief snippet here: "The virtue of formal texts is that…

If only we could get our politicians to only express themselves using formal texts. The clarity it would bring… the honesty it would enforce… the efficiency they would achieve.

Re: Andrej Karpathy: Software in the era of AI [video]

#800
post #407

Earlier quoted context omitted.

I guess, it depends on the case and the approach. It works really nice with the following approach (distilled from experiences reported by multiple companies) (1) Augment codebase with explanatory texts that describe individual modules, interfaces and interactions (something that is needed for the humans anyway) (2) Provide Agent.MD that describes the approach/style/process that the AI agent must take. It should also…

> distilled from experiences reported by multiple companies Distilled from my experience, I'd still say that the UX is lacking, as sequential chat just isn't the right format. I agree with Karpathy that we haven't found the right way of interacting with these OSes yet. Even with what you say, variations were implemented in a rush. Once you've iterated with one variation you can not at the same time iterate on another…

Yes. I believe, the experience will get better. Plus more AI vendors will catch up with OpenAI and offer similar experiences in their products.

It will just take a few months.

Post reply on HN