HNHacker News
TopNewBestAskShowJobs

philiplu

761 karma · joined May 1, 2014

Retired C++ compiler dev at Microsoft. Current Project Euler enthusiast. Contact via pml-hn@lucido.net
submissionscomments
philiplu··on The First 50M Prime Numbers (1975) [pdf]
Back in the 70s, when I was a teen, we had a set of Encyclopedia Britannica. It came with a service where you could send off for various pamphlets for more focused information. I sent away for a paper listing pi to 10k or maybe 100k digits. By the late 70s/early 80s, that was outdated, as I wrote code to find those for myself (though e to many places was far easier).
philiplu··on Researchers launch "moonshot" to cure blindness through eye transplants
I lost vision in my right eye after failed retina detachment surgery damaged the optic nerve. I don’t see blobs of light like you describe, though I do see a dim pattern of swirling lines when I walk into a dark room. Also, weirdly, if there’s a sudden noise while I’m in the dark, I often see a flash of light go off, like an old flashbulb. I’m guessing that’s my visual system somehow rewiring itself to other sensory input.
philiplu··on Visual Basic 6 IDE recreated in C#
I mostly stayed hands-off and let him explore where he would. He really only got into programming more seriously the past couple years, so age 13 on, after we got him a gaming PC. He was playing various Roblox games, and decided he could write his own, so that got him started. He has his phone on bus rides to/from school, so he decided to play around in Python to pass the time. He's currently playing Space Engineers with some friends online, and they've all apparently decided the most fun for now is to learn C# for the internal scripting functionality that game provides.
philiplu··on Visual Basic 6 IDE recreated in C#
My kid (15 yo) keeps producing games in Python on his iPhone using Pythonista. Latest one is a Tetris clone with load/save game, music, animations on removing a line. I offer to help if he runs into problems but he prefers to hack away and learn on his own. Proud dad here :-)
philiplu··on The Soul of an Old Machine: Revisiting the Timeless von Neumann Architecture
Much of my earliest computer experience was on an 1130 clone, the General Automation 18/30. Never did the AM radio thing, but you could see what phase the Fortran compiler was up to just by the general look of the blinkenlights.
philiplu··on Math is still catching up to the genius of Ramanujan
> I found it quite ironical how the whole topic has been hijacked into this side discussion

Indeed. I submitted this post, because I found the article's discussion of the math involved fascinating, along with biographical details of Ramanujan I hadn't heard about before. I'm surprised to see how popular the post is, but also that there's maybe 5 or so posts that engage with the actual mathematics.

I probably shouldn't be surprised - generating functions pointing out unexpected connections between different restricted integer partitions is pretty niche.

philiplu··on Project Euler #912: Where are the Odds?
I do, but there's nothing too obscure in it. Efficient prime number sieve, prime factorization using trial division, generating list of divisors from the prime factorization, modular inverse via Euclidean algorithm, Chinese Remainder Theorem.

I also have some stand-alone modules, one to solve generalized Pell equations, another to find a polynomial given a sequence via the differences (e.g. 2, 5, 10, 17, first differences 3, 5, 7, second 2, 2 is enough to find n^2+1). There's another to find the closed form for a sequence as a linear recurrence.

Some solvers have much more extensive libraries, but I tend to grab bits of code from old solutions to reuse on the fly.

philiplu··on Project Euler #912: Where are the Odds?
One other thing - can't believe I forgot to mention this: once you solve a problem, read the solvers' thread in the forum! I learned so much by doing that, which fed into success on later problems. The link will be at the bottom of the problem page once you've solved it.

There are some much later problems where some obscure technique gets mentioned, even though the problem is doable without that technique. But then later on, there are other problems where that technique is practically required. I can think of multiple 100% difficulty problems which were actually much easier than that for me, because I had already seen and tried out the techniques that enable a fast solution.

And sorry, not going to mention any of those techniques. A lot of the fun I have in solving PE problems is that incremental increase in knowledge as time goes on.

philiplu··on Project Euler #912: Where are the Odds?
Something this illustrates, though - once you solve a problem, read the forum thread (the link will be at the bottom of the problem page when solved).

I learned so much poring over the solutions of earlier solvers. Without that knowledge, there's no way I could have gotten lots of later problems.

Sure, problem #15 is very early and I happened to know the answer right off, back the first day I started solving PE problems. But even so, there are some gems in the posts from other solvers.

philiplu··on Project Euler #912: Where are the Odds?
That's exactly what Project Euler problems often do, especially once you get past the first hundred or two. Problems are scaled so a brute-force often means hours to days of compute time, or worse.

You get to recognize the effect - if I see a problem that's clearly number-theory related and with a limit of 10^12, I know they're looking for a sublinear algorithm, probably O(n^(2/3)) thanks to various multiplicative function ideas that appear over and over.

philiplu··on Project Euler #912: Where are the Odds?
As a class of problems, I'd say the combinatorial game theory ones are my favorites. There are a lot of impartial game theory problems - look for problems mentioning Nim or stone games. They build on each other nicely, from the mid 300s on. The site has been getting into partisan game theory problems in the past year, which finally got me to buy "Winning Ways For Your Mathematical Plays", vol 1, and "Lessons In Play". I find pretty much any problem with John Conway's influence fun to do.

As for a single problem, I'm fond of PE589, "Poohsticks Marathon". That was my 501st solution, two years after first attempting it (solved 5 years ago, yikes). I like it because it's a problem with a 95% difficulty rating, so very tough, but the development team slotted it in as an easy problem (problems normally get scheduled in batches of 6 with a cadence of medium/easy/medium/easy/medium/hard). Once I solved it, I agreed that it was relatively easy, in that it uses techniques introduced by early PE problems, but something about it makes using those techniques unexpectedly difficult.

philiplu··on Project Euler #912: Where are the Odds?
I've got a bachelor's in math, but that's 40+ years ago. I had intended to go on for a PhD in math, but fell into computers instead - programming was easier and way more lucrative, even in the early 80s. Once I was retired and found my way to Project Euler, it became an obsession, tickling that desire to go deeper into math that I had in my college days.

I attacked roughly the first 250 problems in order. The early problems build on each other to introduce new topics. I also got good at figuring out the right search term to find some random paper in number theory, combinatorics, probability, whatever.

Later problems introduced new, more niche areas, like chromatic polynomials and impartial & partisan game theory. But by then, I found it much easier to figure out what part of math a problem was based on and how to find relevant literature.

It helps to be really really stubborn, and to have the patience to let a problem stew in my brain, sometimes for weeks at a time. That seems to help lead to that Eureka moment.

philiplu··on Project Euler #912: Where are the Odds?
It’s my game plan for keeping my brain active in retirement. Been heavily involved for the past 7 years. Been at the 100% solved level since summer 2023, though I’m back to one away the past couple weeks - PE910 is _hard_
philiplu··on Using the Moon as an Echo [video]
I was explaining ham radio to my kids last night (something neither teenager had ever heard of), and ran across https://en.wikipedia.org/wiki/Earth–Moon–Earth_communication.
philiplu··on Why Italy Fell Out of Love with Cilantro
Diagnosed celiac here, though a fairly mild case - blood test detected it 16 years ago, age 48, but I don't know if I've been hit with gluten, though celiac explains why I'm several inches shorter than my brothers and have bone density issues.

Anyway, I love fresh cilantro leaves in food, though it was an acquired taste. So probably no relationship to celiac.

One interesting off-topic datapoint about my diagnosis. I love asparagus, and remember I used to smell "asparagus urine" when I was young, but hadn't for decades. After going gluten-free that typical smell in my urine returned, leading me to believe my celiac diagnosis was accurate and my gut was repairing itself.

philiplu··on Leaving Rust gamedev after 3 years
Not true by the time I retired in 2007, but I've got a vague memory of talking to someone on the C++ front-end team some time after that and EDG for IntelliSense being mentioned. So no idea if that's really true or not, and if so, whether that's true today.

I was heavily involved in the first version of C++ IntelliSense, roughly 1997?, and it was all home-grown. It was also a miracle it worked at all. I've blocked out most of the ugly details from my memory, but parsing on the fly with a fast enough response time to be useful in the face of incomplete information about which #if branches to take and, especially, template definitions was a tower of heuristics and hacks that barely held together. Things are much better nowadays with more horsepower available to replace those heuristics.

philiplu··on Leaving Rust gamedev after 3 years
I was a developer on the Microsoft C++ compiler team from 1991 to 2006. We definitely didn't purchase someone else's compiler in that time. We looked at the EDG front end at various times but never moved over to it while I was there.

Perhaps the speed-up you remember had something to do with the switch-over from 16 bits to 32, which would have been the early to mid 90s. Or you're thinking of Microsoft's C compiler starting from Lattice C, back in the 80s before my time. There was also a lot of work done on pre-compiled headers to speed compilation in the latter half of the 90s (including some that I was responsible for).

philiplu··on A Social History of Jell-O Salad (2023)
Brings to mind James Lileks' "Gallery of Regrettable Food", https://lileks.com/institute/gallery/. I was born in 1960, so missed most of these delights - I suspect they mostly tailed off by the mid-60s. But, yeah, I remember some of the recipe cards my mom had from the 50s and early 60s were pretty frightening.

Edit: and, of course, the Gallery is linked early in the article. Yes, I commented before reading. Sorry. It is worth a read!

philiplu··on Let's compile like it's 1992 (2014)
I’ve got a 15 yo who decided to start programming in Python using Pythonista on his iPhone. He refuses to take any input from me; just wants to learn on his own. Pythonista comes with some nice game-programming modules. So far he’s shown me a Pong game, 2048 clone, air hockey, and more.
philiplu··on Hell is other people: performance management at Big Tech
I was at Microsoft from 1991 to 2007, almost always as an IC, and don't ever recall stack-ranking teammates. That was always something done by the managers, not the ICs.

Even my short stint as a manager (with one report, lol), I wasn't on any of the stack-ranking meetings, thankfully.

philiplu··on Seximal is objectively the best way to represent numbers
Heh, I hit that next year. This last birthday, it occurred to me that the Hamming weight (popcount) of my age in years was the largest it would ever get, barring me living to a really unlikely age.
philiplu··on Motorola's pioneering 8-bit 6800: Origins and architecture
The 6809 (and 6800) helped me pay for my computer habit back in the late 70s/early 80s. I wrote a program for those CPUs, "Dynamite Disassembler", which I originally wrote to reverse engineer a bunch of code in the Flex and OS-9 OSes. Cleaned it up and managed to sell enough copies, at something like $150 a pop, that I could afford to buy more computer gear while I was a mostly-broke college student.
philiplu··on Chromostereopsis
Lost all vision in my right eye to retinal detachment over the summer, but to me, the brains look closer than the background in both cases, though maybe more pronounced in the red brain on the left.
philiplu··on Modernity has made us allergic
Celiac or allergy? I've got celiac, diagnosed at age 47, but it explains a lot of growth issues back to my teenage years. Never heard of phages in relation to gluten issues; that's very interesting. Seems unlikely to help with celiac since that's an autoimmune issue.
philiplu··on 1901: Semiconductor rectifiers patented as “cat's whisker” detectors
Yep, the old Radio Shack 100-in-1 kits. Great fun (early to mid 70s for me).
philiplu··on Defenestration of Prague Window (2019)
As an avid SF reader back then, I pretty much devoured everything by the big 3 of Clarke, Asimov, and Heinlein. And lots of others, of course - the Callahan's Bar shorts by Spider Robinson were a fun update of the Tales from the White Hart idea.
philiplu··on Defenestration of Prague Window (2019)
Heh, sorry to disagree, but that's a big nope. I learned the word in my teens, back in the 70s, from the Arthur C. Clarke story "The Defenestration of Ermintrude Inch" in his "Tales from the White Hart" collection of SF-oriented tall tales.
philiplu··on Windows: A software engineering odyssey (2000)
I was a dev on the Visual C++ team at this time (1990s). Part of making largish compiler changes would involve throwing a test compiler at all of WinNT and seeing what broke in the build process. It was challenging to do so, to say the least. Just getting the whole mess set up was a struggle for me.

Of course, things got better as time went on thanks to process improvement. I started in 1991, and I remember driving over to the NT team's building with a large (for the time) hard drive to grab a physical copy of the source tree. This was before NT was first released - when you tried running your build and went to shut it down, you had to watch the activity LED on the drive flash a few times to be sure the cache had synced to disk and powering down was safe. Fast forward a few years, and building all of WinNT was more routine, to the point it was just another component built by the automated VC++ checkin procedure (we called it submitting code to The Gauntlet), along with Excel and other Office components.

I might be misremembering if NT was part of Gauntlet, but it was definitely something we could and would build as desired.

philiplu··on Why do recipe writers lie about how long it takes to caramelize onions? (2012)
Yep, that's what I meant.
philiplu··on Why do recipe writers lie about how long it takes to caramelize onions? (2012)
Nope - those are all bagged single ingredients I usually order online. Authentic Foods has most of them. The ivory teff is from Maskal. The arrowroot and tapioca might be called flour, starch, or powder - all the same thing. Potato starch and potato flour are 2 different things.
← PreviousPage 2 of 4Next →