HNHacker News
TopNewBestAskShowJobs

jmillikin

11,783 karma · joined March 23, 2009

https://john-millikin.com/

john@john-millikin.com

Currently semi-retired; formerly at Google (2011-2017) and Stripe (2017-2022)

submissionscomments
jmillikin··on SVB in talks to sell itself after attempts to raise capital fail
This headline is part of the bank run they are currently experiencing.
jmillikin··on I'm used to creating weekly HN accounts
https://news.ycombinator.com/newsguidelines.html

  > Throwaway accounts are ok for sensitive information, but please
  > don't create accounts routinely. HN is a community—users should
  > have an identity that others can relate to.
https://news.ycombinator.com/item?id=17996295

  > dang on Sept 15, 2018
  >
  > HN can't be a community without members. Disembodied comments are
  > not community members. No one is required to use their real name
  > here, but users need to have some consistent identity for others
  > to relate to. Otherwise we might as well have no usernames and no
  > community at all.
jmillikin··on I'm used to creating weekly HN accounts
Every post has many readers, now and in the future, and you never know what their mental situation might be like. For many people the value of a persistent identity isn't worth the risk.

I used to post under a pseudonym, but one day a person stalked through that account until they found my (pseudonymous) website, then my name, then called my employer with the goal of getting me fired. They did this because they were upset I had written a programming example in Haskell. My employer at the time was a defense contractor and they luckily (for me) decided to put the event into the "unknown third-party is threatening a TS/SCI employee" bucket, with a response as subtle as might be expected.

Unfortunately, there are people in other circumstances who face a legitimate risk of losing their job and/or career if they attract attention from some passing lunatic. That's why it's considered good practice to avoid tying too much sensitive information together in one account.

Nowadays I post under my name on (semi-)professional forums like HN, and anonymously elsewhere. No pseudonyms, because they provide a false sense of security.

jmillikin··on Google Search Is Dying (2022)
Google used to support this[0], and I used it happily for blocking low-quality domains such as Experts Exchange, certain Wikia subdomains, and Pintrest. The feature was later removed[1] in favor of a browser extension, but the extension was less functional because it could only filter out results from the current page, so heavily-spammed keywords had result pages with only one or two links.

Nowadays, with the results being entirely spam for multiple pages, I think a return of the server-side filtering would be necessary if it's to be at all useful. Otherwise you'll get page after page of blank SERPs.

[0] https://searchengineland.com/google-brings-back-blocking-sit...

[1] https://searchengineland.com/googles-more-personalized-resul...

jmillikin··on Ask HN: What do you think about rust enthusiast?

  > However the proselytizing of rusters, notably on reddit
It's important to remember three facts about mass-market anonymous forums such as Reddit:

* There is no way to know whether someone who claims to be a user of Rust actually has much experience with Rust, or has even used it. It is common for people to intentionally write antagonistic posts pretending to be member of a group they dislike.

* There is nothing stopping a single motivated person from posting from multiple accounts. The only limit to post throughput is how quickly text can be written (or copy-pasted, or generated).

* People who are most likely to be considered experts in their field (due to talent, experience, intelligence, etc) probably have jobs and/or hobbies, so online forums are mostly filled with posts from people who would never be considered an expert if you met them in real life.

If you want to know what active users of a language think, find specific named individuals and follow them. For Rust, I've found most active users to be very experienced in C/C++ -- the opinion of someone who's spent 20 years as a professional software engineer writing aeronautic firmware is far more signal-ful than that of the typical teenager, and such people do not spend time on contemporary Reddit.

jmillikin··on Ray Dalio's Bridgewater exit package could amount to billions of dollars

  > Bridgewater is a publicly traded company
No it's not.

  > Why should it continue to pay out to the founder after they've departed?
Because distribution of profits is based on ownership.

  > Has Mr. Ray not already received numerous remarkably healthy payouts
  > along the way?
One of the benefits of building a cashflow-positive business is that it can return profits that exceed the initial investment.
jmillikin··on Chimera – a Linux that isn't GNU/Linux
Clearly written by someone with a habit of publishing first and thinking later.

GNU/Linux is in the minority of Linux distributions (vs vendor-specific / embedded), and the combined footprint of all GNU/Linux distributions is a rounding error compared to the most popular Linux distribution of all time (Android). Android is well-known for having its own libc and userland, but even at launch it was treading a well-worn path set down by embedded developers with musl/uclibc + BusyBox.

The rest of the article is so off-track that it's not worth quoting anything specific to take pot-shots at.

If the author was looking for a clickbait angle, I think the choice to start with Wayland is probably more notable as a headline.

jmillikin··on Ask HN: Someone copied my code but it is complicated. What do I do?
1. The person who submitted the pull request is about to cause that other project to violate your copyright, which will cause it significant inconvenience if discovered. Regardless of whether the student making that pull request understands what they're doing, I think it would be good to warn the project.

2. If you want the upstream project to benefit from your code, you might consider selectively re-licensing that portion of it under the same licence (or a compatible one). This should include appropriate boilerplate headers and/or SPDX identifiers, if upstream uses them.

3. An appropriately phrased warning will benefit the student, who has the opportunity to learn the basics of copyright before they accidentally copy a few thousand lines of code from somebody with a legal department.

--

edit: I believe I've located the project and PR in question. Given the context in the thread, if you decide that you're OK with code from your implementation being used as-is under the terms of the BSD license then I think a comment to that effect in the PR would be helpful to all involved.

jmillikin··on My review of the C standard library in practice
Sure, but that's not what's being discussed here.

In C and C++, it's idiomatic to have different major versions use the same includeable name, with the version resolution handled by the build system.

jmillikin··on My review of the C standard library in practice
I think you may have lost track of what this thread is discussing.

To be more concrete, let's say you have the following code (pseudo-Go):

  package main
  import "example.com/http_server" // v2
  import "example.com/utils" // transitively depends on http_server v1

  function main() {
    var srv *http_server.Server = http_server.New()
    utils.ServeHttp(srv)
  }
You're going to have a problem, because ServeHttp expects an HTTP server struct from the v1 API, and you're passing in a struct from the v2 API.

If you tried to write an adapter for this then (1) you'd need to somehow construct a concrete proxy of a type you don't control, and (2) there's no way to import both the v1 and v2 APIs at the same time in your code, so you don't have a way to declare a conversion function.

That's why APIs with versions declared by dependency edges are impractical.

jmillikin··on My review of the C standard library in practice
The naming convention isn't important. If the structs are from different versions of the library then you either have a type error (nominal types) or have to figure out the semantics of arbitrarily uninitialized fields.
jmillikin··on Google stores billions of lines of code in a single repository (2016) [pdf]

  > However, the conceit is that "in the same repo" means you can
  > "change them together."
In a monorepo you shouldn't be making changes to independent components in a single commit. That's how you end up being forced to roll back your change because you broke someone else's service.

If you're making a backwards-incompatible change to an API then you need to:

1. Make a commit to your library to add the new functionality,

2. Send separate commits for review by other teams to update their projects' code,

3. Wait for them to be approved and merged in, then merge a final cleanup commit.

If your repository is designed to enable a single commit to touch multiple independent projects then it's not a monorepo, it's just a single-project repo with unclear API and ownership boundaries.

jmillikin··on My review of the C standard library in practice
That doesn't work in languages with nominal types, and even structurally-typed languages can have a hard time.

You call a function that returns a v1975/SomeStruct and pass it to a function expecting a v2022/SomeStruct. What does the new function do when some of the struct fields are set to invalid values?

jmillikin··on Low Overhead Clustering Software
I doubt there's any such software under active development, because the only entities that run large clusters would be (1) uninterested in 32-bit x86 and (2) want to avoid the reliability problems inherent in a pseudo-unified view of a multi-machine system.

Your best bet might be to hack something together on top of QEMU. You could represent each physical machine as a NUMA node, and maybe use iSCSI for persistent storage. Note that this would imply full virtualization (not VTx), so the performance would be dreadful.

Google suggests the GiantVM project (https://giantvm.github.io/) is an attempt at this. It's a years-old snapshot for a research paper, but you might be able to use it as a starting point.

  > I am aware I can install linux on each node and make a beowulf cluster
  > but I am wondering if there is a cleaner, lower level solution.
As general advice, be really careful about conflating "low level" and "clean". Most architectures benefit from layers of abstraction. If you want to build a distributed VMM and make it host a 200-core 32-bit x86 then that's about as far from "clean" as you can get. It'd be much better, architecturally, to run a distributed process scheduler such as Kubernetes that can directly represent the physical machines.
jmillikin··on My review of the C standard library in practice
Discussion yesterday: https://news.ycombinator.com/item?id=34752400
jmillikin··on Google stores billions of lines of code in a single repository (2016) [pdf]

  > Sure, but this is unsustainable. [...] After two years you'd have
  > 10 unique dependencies for 10 versions of myjslib in the monorepo.
This is a social problem, and needs to be solved by a dependency management policy. Your org might decide that the entire org is only allowed to use a single version of each third-party dependency (which IMO is harsh and unhelpful), or might have a deprecation period for older versions, or might have a team dedicated to upgrading third-party deps.

Note that this need for a policy exists for both mono-repo and multi-repo worlds. Handling of third-party dependencies ought to be independent of how the version control repository is structured.

  > At this point you've basically replicated the dependency semantics of
  > a multi-repo world to a monorepo, with extra cruft. This problem is
  > already implicitly solved in a multi-repo world because each service
  > simply declares its own dependencies.
The problem with the multi-repo solution is that there's no linear view of the changes. Each repo has its own independent commit graph, and questions like "does the currently deployed version of service X include dependency commit Y" become difficult or impossible to answer.

That's why monorepos exist. They're not a way to force people to upgrade dependencies, and they aren't a get-out-of-jail-free card for thinking about inter-project dependencies. A monorepo lets you have a linear view of code history.

Phrased differently: many people approach monorepos as a way to force their view of dependency management on other people in their organization. The successful users of monorepos (including Google) take great efforts to let separate projects in the same repo operate independently.

jmillikin··on Google stores billions of lines of code in a single repository (2016) [pdf]

  > The single version dependencies are asinine. We are migrating to
  > a monorepo at work, and someone bumped the version of an open
  > source JS package that introduced a regression.
There's no requirement to have single versions of dependencies in a monorepo. Google allows[0] multiple versions of third-party dependencies such as jQuery or MySQL, and internal code is expected to specify which version it depends on.

  > It encourages poor API contracts because it lets anyone import any
  > code in any service arbitrarily.
Not true at Google, and I would argue that if you have a repository that allows arbitrary cross-module dependencies then it's not really a monorepo. It's just an extremely large single-project repo with poor structure. The defining feature of a monorepo is that it contains multiple unrelated projects. At Google, this principle was so important that Blaze/Bazel has built-in support for controlling cross-package dependencies.

  > I see at least one PR every week [...] because some shared config
  > or code changed in another part of the repo and now the entire repo
  > needs to be migrated in lockstep for things to compile.
That really doesn't sound like a monorepo to me. If all the code has to be migrated "in lockstep", then that implies a single PR might change code across different parts of the company. At which point it's not independent projects in a monorepo, it's (merely) a single giant project.

[0] Or allowed -- I last worked there in 2017.

jmillikin··on Intel Cuts Employee Pay to Maintain Quarterly Dividend
In the USA, dividends may be taxed at the capital gains rate depending on the company (Intel qualifies) and how long the position has been open.

https://www.investopedia.com/terms/q/qualifieddividend.asp

jmillikin··on Rewrite it in Rust

  > Perhaps, but then wouldn't the issue just be that iswdigit()
  > is practically useless, rather than that it 'requires' (it doesn't)
  > using a type that may only be 16-bit?
In my opinion yes, though obviously opinions vary.

When Unicode expanded beyond the BMP, the decision by some platforms (Windows, Java, JavaScript) to represent "wide characters" as 16-bit integers became a problem. APIs that accept strings rather than "characters" could be adjusted from UCS-2 to UTF-16, but anything shaped like iswdigit() needed to be reconsidered.

The thing about iswdigit() and friends is that it does mostly do what people expect so long as (1) they don't need to write cross-platform code and (2) their localization needs are simple (BMP only), which is true of like 95% of software, so it can be hard to convince anyone to stop using it in favor of more robust solutions like libicu.

jmillikin··on Rewrite it in Rust
wint_t represents either a wchar_t or the sentinel value WEOF. You shouldn't pass an arbitrary Unicode codepoint to iswdigit() on platforms with 16-bit wchar_t.
jmillikin··on Tech Layoffs Shock Young Workers. The Older People? Not So Much.

  > Millennials and Generation Z, born between 1981 and 2012,
  > started tech careers during a decade-long expansion when
  > jobs multiplied as fast as iPhone sales.
I'm always amused by the media trying to conflate "millennials" with young people, because at this point someone born in 1981 is middle-aged and their children are graduating university. There's no commonality with someone born in 2012, who would currently be in 5th grade.
jmillikin··on Two research teams reverse signs of aging in mice
From your own link, without even scrolling down:

  > Janesich and Young stress that their results, both
  > original and new, in no way imply that those vaccines
  > integrate their sequences into our DNA.
jmillikin··on Don't Use Stripe

  mainly talking about coding in PERL. It's a little sus.
This line stood out to me because I've seen it before. There's someone (or a group of someones) who repeatedly posts this same rant about Stripe on both Reddit and HN, slightly modifying the claimed business. For example, one iteration was a cell phone store in Denver that had their funds held after using their Stripe account to sell a used vehicle:

Four months ago: https://news.ycombinator.com/item?id=32261868

The Reddit post linked to by ^^: https://old.reddit.com/r/tifu/comments/wa230m/tifu_by_using_...

60 days ago: https://news.ycombinator.com/item?id=33254485

Note how the following paragraph appears word-for-word the same in all three posts (select, ctrl+c, ctrl+f to verify):

  If you do a little bit of research about this topic,
  [...]
  mainly talking about coding in PERL. It's a little sus.
jmillikin··on Kraken lays off 30% of staff
Sure, but that's not what's being discussed in this thread.

"The riskiest stocks are down thousands of %" is untrue regardless of whether that position was in regular shares or /r/WSB style 10,000 calls expiring Friday.

jmillikin··on Kraken lays off 30% of staff
A long position in an option can't be down more than 100%.

The only commonly traded way to lose more than you started with are futures (not available on most retail platforms) and CFDs (not legal in many markets, including the USA).

jmillikin··on Tell HN: Rust Is Complex
Complexity is relative.

Go is a language for high-level application development. It has a runtime, garbage collection, and a sophisticated M:N threading scheduler that are all designed to help the programmer express themselves in terms of the problem domain. It competes with Java, C#, and (in some cases) Python or Ruby.

Rust is a language for low-level systems programming. It needs far more complexity than Go because the programmer might need to make extremely specific guarantees about performance or memory layout. It competes with C++ and C.

Is Rust a more complex language than C++? It's not obvious to me that this is true when you add in the third-party tooling (linters, static analysis) required to provide Rust's correctness properties in a C++ codebase.

Is Rust a more complex language than Go or Java? Sure. Obviously. Anyone who says it's not is lying or foolish. But that's not the comparison being made.

jmillikin··on Go ahead, be rude. It will cost you $350k
"The customer is always right" refers to the product design. If you sell shoes that you think are the best on the market, but customers think they're bad, the customer is always right. It helps direct attention toward selling what people want, not what you think they should want.

Notably it does not mean that individual customers (or would-bes) are always justified in their complaints.

jmillikin··on Re: Please don't drop support for AmigaOS
You separate out the core logic so it can be tested on any platform, and only the truly OS-dependent code needs to be target-specific.

I should be able to run the test "expand this glob as if on AmigaOS, with given homedir path" on a Linux desktop.

jmillikin··on Re: Please don't drop support for AmigaOS
Some folks might wonder why GNU Make would require ongoing OS-specific maintenance at all. The answer lies with GNU coding standards, which are broadly unchanged since the 1980s and are extremely hostile to portability in the modern sense.

--

First, if you look through the Make code, you'll see it's riddled with #ifdef lines for each supported OS. In modern code you'd separate these out into per-OS sub-libraries with a common API, but in GNU code it all gets mashed together.

Here's a good example I found from a quick search -- it's trying to find a default value for the user's home directory, which could easily be a per-OS function, except that that's not how it worked in the '80s so instead they embedded environment variable lookup into a SEVEN HUNDRED LINE glob() FUNCTION IN lib/glob.c.

  #ifndef VMS
    if ((flags & (GLOB_TILDE|GLOB_TILDE_CHECK)) && dirname[0] == '~')
      {
        if (dirname[1] == '\0' || dirname[1] == '/')
   {
     /* Look up home directory.  */
  #ifdef VMS
  /* This isn't obvious, RTLs of DECC and VAXC know about "HOME" */
            const char *home_dir = getenv ("SYS$LOGIN");
  #else
            const char *home_dir = getenv ("HOME");
  #endif
  # ifdef _AMIGA
     if (home_dir == NULL || home_dir[0] == '\0')
       home_dir = "SYS:";
  # else
  #  ifdef WINDOWS32
     if (home_dir == NULL || home_dir[0] == '\0')
              home_dir = "c:/users/default"; /* poor default */
  #  else
  #   ifdef VMS
How do you test that? In modern code you'd have an OS-independent unit test for glob expansion, and a separate test for "get homedir on AmigaOS", and the AmigaOS code would never change because why would it?

Plus, the code itself is horrible, like if you read this and think "wait, they're nesting `#ifdef VMS` inside `#ifndef VMS`, what is their intention" then buckle the fuck up because the entire project looks like that.

--

Second, many GNU projects use a library named gnulib, which is a sort of anti-portability library developed to make every system look like GNU libc. To achieve this goal the gnulib code digs deep into opaque implementation details of the underlying system libraries, stuff like the layout of `struct FILE` or whether particular symbols are constants or macros. As you might expect this shit breaks constantly, even the most dirt-common gcc+glibc+Linux system might fail to build a GNU project from a year ago because the glibc folks changed something that gnulib implicitly depended on.

Things get even worse from there, like if you try to build with musl or Clang then you're in for potentially days of reading mailing lists and digging up old CVS checkouts to figure out how to get the damn thing to compile. And we haven't even talked about OS portability yet! It took me weeks to get a working GNU Bison build on Windows because I had to hunt down dozens of places where they assumed that sizeof(int) == sizeof(long) == sizeof(void*). That's on the world's most popular workstation OS, good fucking luck getting any sort of confidence that the code works as expected on an Amiga.

--

In summary, the GNU folks have intentionally structured their code such that it's difficult to maintain across platforms, and this email list is merely one of the observable outcomes of their decision.

jmillikin··on Multiple assertions are fine in a unit test
That's why the first check is a hard assertion (returning on error), and the others are soft (continuing on error).

If the list is empty, then the log will contain one error about the length being zero. If the list has one item but it has the wrong properties, the log will contain two errors.

← PreviousPage 7 of 34Next →