HNHacker News
TopNewBestAskShowJobs

evmar

6,887 karma · joined June 7, 2011

https://neugierig.org

evan.martin@gmail.com

My posts on HN: https://news.ycombinator.com/from?site=neugierig.org

submissionscomments
evmar··on Zig's New Relationship with LLVM
I responded to this in https://news.ycombinator.com/item?id=24619216
evmar··on Zig's New Relationship with LLVM
I don't recall measuring it in particular. Some thoughts on it anyway:

1. Even if you take a single binary and split it into multiple objects, you still must do the same "linking" work of resolving where functions point to. It's just that work is done as part of startup, at runtime, by the dynamic loader. I have seen (in other contexts) splitting up a big C++ binary into multiple pieces dramatically impact startup time.

2. You can't inline across shared objects. Inlining is the "mother of all optimizations" -- it's the biggest benefit, and most other optimizations interact with it. (For the simplest case, imagine a getter on an object. Inlined, it compiles to a pointer+offset dereference, while across modules it compiles to a lookup in a pointer table plus a function call.) This also means you can't delete unused functions and so on.

3. There's no real memory savings from shared objects in this manner, even when different subprocesses of Chrome only use different subsets of the binary, because the OS only pages in the part of the binary it uses.

In general, given there's no user benefit for multiple shared objects, there's little reason to not have a single binary, except for build time. But for releases Chrome does a lot of other work (I think even profile-guided optimization these days, though that is after my time) for performance anyway. In the old days we were making changes to save as little as 40ms of startup time (http://neugierig.org/software/chromium/notes/2009/01/startup... and http://neugierig.org/software/chromium/notes/2009/04/perf.ht...). Looking back at the post now, I see that -fPIC cost 12% of the WebKit JS engine performance, which is maybe another strike against relocatable objects (though maybe these days we use PIE anyway? I am pretty rusty on all this).

If I had an app that was multiple shared objects I might be more interested in measuring the benefit before switching it to a single binary, since while I know the benefit is nonzero you have to balance it against the cost of implementation. But in Chrome's case we started with the single binary build, so there was little reason to measure.

I would guess in IE's case they were more interested in providing reusable APIs used by multiple other systems. In Chrome's case that was never a design goal.

evmar··on Zig's New Relationship with LLVM
I wrote a sibling reply to this with some links on how I did this for the Chrome build, https://news.ycombinator.com/item?id=24617526 .
evmar··on Zig's New Relationship with LLVM
At one point I got Chrome (a genuinely massive C++ project) to compile+link in under six seconds:

http://neugierig.org/software/chromium/notes/2011/02/ninja.h...

One of the big tricks not mentioned there is to decompose the app into multiple .so files (only when debugging -- release is still a single binary), so that you don't need to rebuild files unaffected by your incremental changes. I wrote more about that here:

http://neugierig.org/software/blog/2012/07/gyp-toc.html

evmar··on Handshake – A Namespace for the Decentralized Web
From the site:

"Stop paying for new domains"

Also from the site:

"Buy Handshake coins"

:(

evmar··on URL query parameters and how laxness creates de facto requirements on the web
My favorite story to tell in this area: many years ago in the early days of Chrome, there was some logic that followed HTTP redirects that had a cap on how many redirects to follow before giving up. (The rationale here is that if you hit too many in a row you probably had encountered a broken site , like one where /foo?q=1 redirects to /foo?q=2 redirects to q=3 and so on).

As I recall, the cap on redirects was 10, and then Darin (who had previously worked on Firefox) was like "no, you have to allow up to 30 or you break the New York Times". And so, it was upped to to 30. Intuitively I'd think a site that redirected you 10 times was broken, but I guess someone built one that needed more.

PS: Looking online now to confirm my facts, I see one claim that both Chrome and FF limit redirects to 20. So either my memory exaggerated it as 30 or they both managed to lower the limit at some point.

evmar··on Ubuntu 20.04 LTS’ snap obsession has snapped me off of it
That is really disappointing to read. We put a lot of effort into making Chrome start quickly. Back when I was responsible for Linux Chrome, I gave a lighting talk at the Ubuntu Developer Summit about it, and demoed Chrome starting faster than Gnome Calculator.
evmar··on One-third of American renters expected to miss their August payment
(This comment is a nearly flawless example of https://en.wikipedia.org/wiki/Poe%27s_law , well done!)
evmar··on The terms of the AGPL are pretty easy to comply with
I can't comment on the "true" motivation for releasing these documents, but I noticed the same site includes https://opensource.google/docs/thirdparty/oneversion/ which is a very Google-internal-only kind of problem, complete with broken links to Google-internal-only tools and processes (rosie and lsc). That page at least is definitely just a dump of the internal documentation.
evmar··on OpenAI's GPT-3 may be the biggest thing since Bitcoin
For those responding to the title or first half of the article, you are missing the point!

Edit: the comments that are reacting to the article's content are from people who didn't read it to the end, wow.

evmar··on Columbus’s Ultimate Goal: Jerusalem (2006) [pdf]
I don't know about Columbus in particular, but most famous people like him have people from different countries continuously edit warring over which country gets to "claim" him. I'll check the talk page ... yep, half the talk is arguing about this.

(As an American, I find this phenomenon extremely silly and very foreign feeling. I don't really care whether "my" ancestors get credit for something or not, especially given that national boundaries and people move around all the time. I find it vaguely nationalistic in the ugly sense. Maybe it's because there were plenty of great Americans who were clearly not born here in the first place?)

evmar··on The Defaults Don't Work
One of the most commonly repeated pieces of advice I got about having children from other parents is that "you will never feel ready for it".
evmar··on Zsh and Fish’s simple but clever trick for highlighting missing linefeeds
I'm working on a shell that does this, for exactly the reasons you gave and more. It doesn't work well enough to announce here, but you can find an index of shells (including others that have had this idea) here: https://github.com/evmar/smash/wiki/Related-projects
evmar··on The social obligation to be bad at things
I found that, as a person who (sometimes) creates things, my attitude towards other people who create things has significantly shifted.

When I was younger I would just see the fault -- the typos, the narcissism, the pointlessness, the already-been-done-better-by-others -- of people's work. But after trying a bit, it sometimes (for the same reasons the OP talks about) creating anything new ends up being really hard in part because while you struggle everyone is shouting "lame!" from the sidelines (and doing nothing). You see this a lot on this site in particular -- the "middlebrow dismissal" HN is famous for.

So now, even when I see something that I genuinely think is lame, I think of this problem and keep my negativity to myself. I might give useful criticism but I try to keep the balance in mind. Even if you publish something you've made that is kinda lame, I still think it is awesome that you are taking the effort to finish something. The best way to get better is by making multiple attempts.

evmar··on Speeding up a Git monorepo
That is also what I immediately noticed. The graphs showed that the slow runs were around ~4s (p50) or ~7s (p90), and then also mention that Linux was 5-10x faster. This would mean the same operations on Linux are somewhere around 1s in the worst case, which is perhaps even faster than their sped up system.

But instead they had to build all this extra junk like an additional caching layer and daemon (wasting memory and CPU) atop the kernel's existing cache just to work around the kernel being slow.

evmar··on How to Make this Moment the Turning Point for Real Change
If you have the time to read one more thing, I recommend https://www.africa.upenn.edu/Articles_Gen/Letter_Birmingham....
evmar··on How to Make this Moment the Turning Point for Real Change
Alternatively, it's extremely sad, because it means we haven't made progress on the issues of 50 years ago.
evmar··on How to Make this Moment the Turning Point for Real Change
MLK gave a speech at Silicon Valley's own Stanford and touched on this subject (the same one with the "riot is the language of the unheard" quote you might have seen circulating).

https://www.crmvet.org/docs/otheram.htm

See the bit starting with: "Now there's another notion that gets out, it's around everywhere. It's in the South, it's in the North, it's In California, and all over our nation. It's the notion that legislation can't solve the problem, it can't do anything in this area. And those who project this argument contend that you've got to change the heart and that you can't change the heart through legislation."

To summarize it, he disagrees with you.

evmar··on Ask HN: Dear open source devs how do you sustain yourself
I have been able to write some free software as part of my paying job. For some companies this is a real strategy, that is explained by companies commoditizing their complements [1].

[1] https://www.joelonsoftware.com/2002/06/12/strategy-letter-v/

evmar··on The Success and Failure of Ninja
Ninja originally used `.d` files as well (it was built while incrementally replacing a make-based system so it did many things like make). My recollection is that it was already faster than make without the deps log, but it is almost certainly project specific, and perhaps due to the ways we were abusing make (search for "clever hacks" on http://neugierig.org/software/chromium/notes/2011/02/ninja.h... for some discussion of this.

With that said, the deps log processing of .d files was a huge win for us. One thing to observe is that it's the same code and amount of work either way, but if you load them at startup they are processed during the critical path, while the deps log parsing happens during the build so their cost is amortized.

evmar··on The Success and Failure of Ninja
The first attempt at Windows tried to do some memory-resident file watching thing that I eventually rejected as too complex. We circled a few more times on different approaches and the final Windows approach is pretty complex.

Look at the WIN32-related ifdefs in https://github.com/ninja-build/ninja/blob/master/src/disk_in... (I would link to something specifically but it's not that long of a file.)

evmar··on I hired a team of shoppers to find out how businesses were opening in Dallas
I know it's probably not "Russian bots", but...

Two of the comments post the same CDC 2017 list, and both come from twitter accounts with 0 posts (one is 100% retweets of anti-"liberal" content). I'm never sure how plausible it is for someone to have the time to sit on twitter all day just to RT these things and then jump onto rando blogs to leave long comments like these.

evmar··on For the Love of Money (2014)
To tie this closer to what we do:

I often think of another NYT article in a similar vein, where they profiled people in the Bay Area whose net worth was in the ~$10m range.

This is an enormous amount of money and you'd think nobody would stick at a job they didn't like once they were at this point. As I recall in the article, the people in this situation kept thinking "I just need a little bit more" to enable some important next step on the luxury ladder, like horse lessons for their children.

I found this chilling especially because as a person who is wealthy but not that wealthy (note that if you make $40k/yr you're in the top 1% of humans already) I could see myself making similar sorts of rationalizations, not about luxury specifically but more around whether I have enough.

I encountered this attitude a lot in the Bay Area for the ~15 years I lived there and it was one of the reasons I recently left -- I worried my son would grow up around it and think that it was somehow normal behavior.

evmar··on Denmark: No aid for companies which pay out dividends or are reg. in tax havens
I used to have some trouble with this one but if you think about it it's the same as "why would anyone want a dollar, it's just a piece of paper". The answer is that for literally anything, if you can exchange the thing for value, then it effectively has that value.

(Or alternatively, you say that dollars are also vanity plates, and are as worthless as stocks.)

evmar··on iCab: Alternative Browser for macOS
Back when Chrome was based on WebKit, my recollection is that WebKit was vaguely half the code. The other half was all the stuff that browsers do that's easy to overlook -- the network stack, process management, 2d graphics engine, cookie management, the URL bar, v8, extensions, etc. And these pieces are the very things that Chrome differentiated and succeeded based on.

(WebKit on Mac includes more of these things, but many of them rely on Mac-specific implementations, which weren't as useful for a browser that is primarily used on Windows.)

evmar··on Computers Can Be Understood
The author had a followup post about this that I found more interesting:

https://blog.nelhage.com/post/systems-that-defy-understandin...

evmar··on Why Aren’t More Users More Happy With Our VMs? Part 1 (2018)
This blog post, and your reply, both touch on how difficult it is to measure performance. But then in the same where you point out that there are many different valid ways you could measure performance, you also make the broad claim that "JSC tends to outperform V8". What are you basing that on?
evmar··on The pope just proposed a universal basic income
Not quite the same thing but this well-regarded nonprofit gives cash instead of alternatives, and their about page talks a bit (with some citations for you to read more) about why this is more effective than alternatives: https://www.givedirectly.org/about/
evmar··on Twttr sketch (2006)
If you look at old LiveJournal the short posting form felt a lot like twitter. Here's what LJ content looked like on the day of that Flickr post:

https://brad.livejournal.com/2000/05/31/

(Edit: switched the link to match the flickr post.)

evmar··on Why We Sleep: A Tale of Institutional Failure
There is a section of the post addressing exactly this rebuttal. Search for "and now this is me" and read onward.
← PreviousPage 9 of 27Next →