HackerTrans
TopNewTrendsCommentsPastAskShowJobs

articulatepang

no profile record

comments

articulatepang
·4 เดือนที่ผ่านมา·discuss
Thank you and yes, I agree! It's neat to use the binomial theorem to see this, because that's the tool the article uses for the main trick/insight it's explaining.
articulatepang
·4 เดือนที่ผ่านมา·discuss
I love complex analysis, and that's the branch of calculus that is most associated with number theory. For example, it was critical in the original proof of the prime number theorem and Dirichlet's theorem on primes in arithmetic progressions. Today, all kinds of number theoretic functions are studied using complex analysis, like the famous Riemann zeta function, Dirichlet L-functions, theta functions, and so on.

So that's what I expected this to be about. And it was super fun to see that it was actually not! Definitely learned something today.

I had to think about the following sentence for a bit: "We know that any integer x obeying f(x)≡0 (mod 125) must obey x≡2(mod 5)."

My explanation (it's basically all in the article, but here I spell it out): If f(x) = 0 (mod 125), then 125 divides f(x). Since 125 = 5^3, it must be that 5 also divides f(x). The only way for 5 to divide f(x) is for x = 2 (mod 5), by brute-forcing all solutions to f(x) = 0 (mod 5). Therefore for f(x) = 0 (mod 125), x = 2 (mod 5).

It's also worth saying why we only need to check all integers between 0 and n-1 when solving an equation mod n:

Suppose that for some integer y, f(y) = 0 (mod n) but y >= n or y < 0. Then for some x between 0 and n-1 (inclusive),

x = y (mod n).

Since the function f is a polynomial with integer coefficients, evaluating f on an integer involves only multiplication and addition by integers. Some crucial facts about congruences:

If x = y (mod n) then a + x = a + y (mod n) for any integer a. If x = y (mod n) then ax = ay (mod n) for any integer a. If x = y (mod n) then x^2 = y^2 (mod n), and similarly other integer powers.

From these we conclude that if x = y (mod n), then f(x) = f(y) (mod n) for any polynomial f.

So, for any y >= n with f(y) = 0 (mod n), there's some x between 0 and n-1 (inclusive) that also satisfies f(x) = 0 (mod n); in fact it's whatever integer in that range that y is congruent to. So we need only check integers in that range to find all possible solutions to f(x) = 0 (mod n).

Forgive me for the long explanation for what are of course elementary facts in number theory! I'm rusty on number theory so I had to explicitly work them out, so I figured maybe someone else might also benefit.
articulatepang
·4 เดือนที่ผ่านมา·discuss
I've had a similar experience with Apple Store employees many, many times: I walk in and vaguely describe what I want, and they steer me to the cheapest item they sell that could possibly meet my stated requirements.

I've also returned Apple products multiple times, once (recently) without the packaging, and once several days past the return window. They refunded me every time, no questions asked.

This makes me wonder if it's part of their training?
articulatepang
·4 เดือนที่ผ่านมา·discuss
Maybe you mean it's a crime to professionally provide advice of this nature without a license?

It is generally not a crime to casually provide advice of this nature without a license. For example, if my friend tells me, "My stomach hurts!", it is not a crime for me to say, "Just grin and bear it, it will be okay." If they subsequently die of appendicitis, I'm unlikely to have legal liability. It would be difficult to characterize what I said as medical diagnosis or treatment.

Similarly, I can tell my friend, "Don't bother paying your taxes, that is a waste of time." This is legal speech. (Of course, helping them evade taxes is another matter.)

What is illegal is to hold oneself out as a licensed doctor, lawyer or engineer, or to provide professional services without a license.

Of course, chatbots operate at scale and give the impression of being professionally qualified even though they don't make specific representations to that effect. You're directionally probably right and I agree with you, I just want to nitpick about what is and isn't criminal.
articulatepang
·5 เดือนที่ผ่านมา·discuss
As you say, "the fundamental theorem of algebra relies on complex numbers" gets to the heart of the view that complex numbers are the algebraic closure of R.

But also, the most slick, sexy proof I know for the fundamental theorem of algebra is via complex analysis, where it's an easy consequence of Liouville's Theorem, which states that any function which is complex-differentiable and bounded on all of C must in fact be constant.

Like many other theorems in complex analysis, this is extremely surprising and has no analogue in real analysis!
articulatepang
·5 เดือนที่ผ่านมา·discuss
You can think of it as returning an equivalence class if you like. Then it's single-valued.

More explicitly, it returns an equivalence class whose members are complex numbers that differ by integer multiples of 2*pi*i.

When it's important to distinguish members of the class, we speak of branches of the logarithm.

Also note the very cool and fun topology connection here. The keyword to search for is Riemann surface.
articulatepang
·5 เดือนที่ผ่านมา·discuss
One technical point about resonance: the fourth-power law only applies when the driving frequency (i.e., the frequency of visible light) is far below the resonant frequency (which is in the UV region of the spectrum). The approximation breaks down the closer you get to the resonant frequency and also above.

I was confused about how a monotonic function (f^4) could possibly describe a resonance phenomenon (which ought to have a strong local extremum), and this is the answer.
articulatepang
·5 เดือนที่ผ่านมา·discuss
For those who don’t know: the film City of God is based on this, and it’s a great movie. One of my all-time favorites. The directing, acting photography and storytelling are all very well done. Worth anyone’s time.
articulatepang
·5 เดือนที่ผ่านมา·discuss
> The money goes to the investors who sell.

The investors who sell are wealthier by amount $X because now they have fewer shares and more dollars.

The investors who don't sell are wealthier by the same amount $X because the shares they kept are worth more, because prices go up.

> keeping the share price initially constant. This statement is definitely incorrect, unless you're being very technicaly and pedantic about "initially". You can think about it theoretically or you can look at empirical evidence. It is well-supported empirically that share prices go up after buybacks, and in fact they do so quantitatively by exactly the amount necessary for the equation implied above to hold.
articulatepang
·5 เดือนที่ผ่านมา·discuss
Three things:

1. From the perspective of shareholders, and for the moment ignoring taxes, buybacks and dividends are exactly economically equivalent. If a dividend happens, you get some cash. If a buyback happens, the value of your shares goes up. Crucially, the amount by which each share's price goes up is equal to what the per-share dividend would have been. It's a useful exercise to work this out and convince yourself that it's true.

2. Now let's stop ignoring taxes. If a dividend happens, you get taxed that year. If the value of your shares goes up, you don't get taxed that year. Instead, you get taxed whenever you sell, which might be later when you retire and are in a lower tax bracket, or after a period of some years when you get a lower capital gains tax rate.

3. Now let's think about the effect of dividends vs buybacks on the allocation of your portfolio as a shareholder. Neither changes the total value of your portfolio -- that was point number 1, plus just plain old conservation of dollars, modulo taxes -- but a dividend increases the proportion of your investment that's in cash, while a buyback keeps it constant. Let's say you auto-invest all dividends in the S&P 500 or equivalent index fund. Then dividends reduce your ownership stake in the company, while buybacks keep it constant.

For these reasons, most investors prefer (or ought to prefer) buybacks: they have the same economic effect as dividends but allow you to defer taxes to whenever is optimal for you. Also, and this is a smaller point, if a company does a dividend then you have to actively do something (that is, buy stock) in order to maintain the same proportion of your portfolio in that company. In other words, if you want 10% of your savings to be in X, and they do a dividend, then you have to take the cash and buy shares of X. The reason this is a smaller point is that at least in theory you can get your brokerage to do this for you automatically.

There are some nuances where point number 1 fails to hold: signaling, bad execution of the buybacks, and principal-agent conflicts. The big example of that final point is executive compensation tied to specific share prices. I'm not an expert in this area so I don't know, off the top of my head, if there's real evidence either way that this effect is very large, but it's one that people will bring up so everyone who thinks about this ought to know about it.
articulatepang
·6 เดือนที่ผ่านมา·discuss
This is great! Lovely to see a clean new codebase implementing quantum chemistry algorithms like Hartree-Fock. I remember using Molpro at my fist job. Venerable and comprehensive it may be, but it is some hoary Fortran code for sure.
articulatepang
·6 เดือนที่ผ่านมา·discuss
I actually visited that link, and the answer seems to be

  "If you've seen my socials lately, you might have seen me talking about Ralph and wondering what Ralph is. Ralph is a technique. In its purest form, Ralph is a Bash loop.

    while :; do cat PROMPT.md | claude-code ; done

  Ralph can replace the majority of outsourcing at most companies for greenfield projects. It has defects, but these are identifiable and resolvable through various styles of prompts."

but the contents of PROMPT.md are behind a paywall. In spirit that is not so different from

  gcc program.c; ./a.out
while program.c is behind a paywall. It's nearly impossible to reason about what the system will do and how it works without knowing more about PROMPT.md. For example, PROMPT.md could say "Build the software" or it could say "Write formal proofs in lean for each function" or ...

In the spirit of curiosity, I'd appreciate a summary of a couple sentences describing the approach, aimed at a technically sophisticated audience that understands LLMs and software engineering, but not the specifics of this particular system.
articulatepang
·6 เดือนที่ผ่านมา·discuss
Thanks dang, you’re right, I apologize and will keep this in mind in the future.
articulatepang
·6 เดือนที่ผ่านมา·discuss
This is so poorly written. What is "Ralph"? What is its purpose? How does it work? A single sentence at the top would help. The writer imagines that the reader cares enough to have followed their entire journey, or to decode this enormously distended pile of words.

More generally, I've noticed that people who spend a lot of time interacting with LLMs sometimes develop a distinct brain-fried tone when they write or talk.
articulatepang
·8 เดือนที่ผ่านมา·discuss
Many tools offer offline file browsing and full text search. Anything from midnight commander to Alfred to ripgrep.

I think the valuable and difficult thing is high quality, fast, offline semantic search, including indexing (so my files don't go to your servers -- that's an immediate no-go for all the important industries).

I've tried my hand at this a couple times and it's hard! But really hope you succeed, because it would be a big game changer in how we organize and use information. Every company out there would buy this immediately.
articulatepang
·8 เดือนที่ผ่านมา·discuss
Won’t this only work when connected to the internet? So I can’t use it on a flight.

Or if I work in finance, or healthcare, or law, or government, or a hardware design company, I don’t want my files leaving my network. Those are very important use cases, much more important than searching my personal laptop. I want this for WORK, not my little photo collection or notes or whatever.

This is a great use case for modern LLM/embedding models but gotta be local to be actually useful in the places where it’s most needed.
articulatepang
·9 เดือนที่ผ่านมา·discuss
I don't think it's that silly. BusyBox packages a bunch of utilities in a single binary. It amortizes fixed costs: a single binary takes less space than 30 binaries that each do one tiny thing.

These are small bits of code, and the functionality is interrelated. The entire thing feels like a calculator, or awk, and seems reasonable to put in one binary.

The Unix philosophy doesn't actually say anything about whether different tools should live in the same binary. It's about having orthogonal bits of functionality and using text as the universal interface. BusyBox is just as Unix as having all the tools be different binaries.
articulatepang
·9 เดือนที่ผ่านมา·discuss
Thanks, I’ll take a look.

I love obsidian for the same basic reason you do: it’s just a bunch of text files, so I can use terminal tools and write programs to do stuff with them.

So far I mostly use LLMs to write the tools themselves, but not actually edit the notes. Maybe I can steal some of your ideas!
articulatepang
·9 เดือนที่ผ่านมา·discuss
What you’re solving with Claude Code. All I could gather was … something with your notes. Would you mind clearly stating 2-5 specific problems that you use Claude Code to solve with your notes?
articulatepang
·10 เดือนที่ผ่านมา·discuss
I'd love to learn more about this. What resources/books/articles/code can I look at to understand this more? Or, if you have some time, would you mind expanding on it?

The parts I'm specifically interested in: 1. What the 300 line pool and allocator look like 2. What this means: "BTW the for-case can simply be supported by setting a pool/global boolean and using that to decide how to wait for a new task (during the paralle for the boolean will be true, otherwise do sleeps with mutexes in the worst case for energy saving)"

Thank you!