Live data from Hacker News

The Languages of English, Math, and Programming

github.com

11–20 of 49 posts

Re: The Languages of English, Math, and Programming

#11

I took a Udacity class by Norvig [1] and my abilities as a programmer clearly were improved afterward. His code here demonstrates why. It is both shorter and much easier to understand than anything the LLMs generated. It is not always as efficient as the LLMs (who often skip the third loop by calculating the last factor), but it is definitely the code I would prefer to work with in most situations. [1] https://www.ud…

Single handedly most important class in my career back in the day. It took me 3 months to really grok and generalize the Qpig algorithm, even my professors couldn't explain it.

It's amazing how he never used the words "AI" once in this course despite the fact that it is a straight up AI course.

I revisit the course notes at least once a year and I still walk away with something new every time.

Re: The Languages of English, Math, and Programming

#12

I took a Udacity class by Norvig [1] and my abilities as a programmer clearly were improved afterward. His code here demonstrates why. It is both shorter and much easier to understand than anything the LLMs generated. It is not always as efficient as the LLMs (who often skip the third loop by calculating the last factor), but it is definitely the code I would prefer to work with in most situations. [1] https://www.ud…

> It is both shorter and much easier to understand than anything the LLMs generated.

I think this makes sense. LLMs are trained on average code on average. This means they produce average code, on average.

Re: The Languages of English, Math, and Programming

#13
post #11

I took a Udacity class by Norvig [1] and my abilities as a programmer clearly were improved afterward. His code here demonstrates why. It is both shorter and much easier to understand than anything the LLMs generated. It is not always as efficient as the LLMs (who often skip the third loop by calculating the last factor), but it is definitely the code I would prefer to work with in most situations. [1] https://www.ud…

Single handedly most important class in my career back in the day. It took me 3 months to really grok and generalize the Qpig algorithm, even my professors couldn't explain it. It's amazing how he never used the words "AI" once in this course despite the fact that it is a straight up AI course. I revisit the course notes at least once a year and I still walk away with something new every time.

What's the Qpig algorithm?

Re: The Languages of English, Math, and Programming

#15
post #11

Earlier quoted context omitted.

Single handedly most important class in my career back in the day. It took me 3 months to really grok and generalize the Qpig algorithm, even my professors couldn't explain it. It's amazing how he never used the words "AI" once in this course despite the fact that it is a straight up AI course. I revisit the course notes at least once a year and I still walk away with something new every time.

What's the Qpig algorithm?

quantile function for the Poisson-inverse Gaussian?

Re: The Languages of English, Math, and Programming

#17

so, in conclusion, the training data containing 'math' that LLMs have access to is predominantly written as software code, and not as mathematical notation

It would be quite exciting to train a LLM with (OCR scans of) all mathematical journals, pre-prints, time-series etc.

Re: The Languages of English, Math, and Programming

#18

I took a Udacity class by Norvig [1] and my abilities as a programmer clearly were improved afterward. His code here demonstrates why. It is both shorter and much easier to understand than anything the LLMs generated. It is not always as efficient as the LLMs (who often skip the third loop by calculating the last factor), but it is definitely the code I would prefer to work with in most situations. [1] https://www.ud…

Actually most of the LLMs algos are less efficient than the readable human one, even with only two nested loops. Only one of them precalculates the factors which makes the biggest difference (there are log2(N) factors, worst case, for large N and a triple loop over those is better than a double loop over 1..N).

Re: The Languages of English, Math, and Programming

#19
post #11

Earlier quoted context omitted.

Single handedly most important class in my career back in the day. It took me 3 months to really grok and generalize the Qpig algorithm, even my professors couldn't explain it. It's amazing how he never used the words "AI" once in this course despite the fact that it is a straight up AI course. I revisit the course notes at least once a year and I still walk away with something new every time.

What's the Qpig algorithm?

Q as in maximum expected utility for a given move, Pig as in the dice game of Pig.

https://web.archive.org/web/20140122073352/https://www.udaci...

Yes, I know that you can get the Q value via RL with Bellman equation or non-parametric evo learning, but at the time I didn't know that and I'm glad I didn't.

Depending on how you count, this code features either 2 or 4 mutually recursive functions, something that is quite rare in Python (esp outside the context of an FSM) but is a signature of PN code.

I had to learn so much about so many things to untangle it.

Post reply on HN