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 Solitaire
Sorry in advance if it's too off-topic, but if you want to play the Windows 2000 Solitaire I have it kind of working in my web-based emulator here:

https://evmar.github.io/retrowin32/run.html?exe=sol.exe&dir=...

evmar··on How core Git developers configure Git
My favorite "took me a long time to discover" Git tweak is to use difft for diffs:

https://difftastic.wilfred.me.uk/

evmar··on Why I'm leaving Elm (2020)
I don't really follow Elm, but I was curious and tried to see whether the project is still alive. It appears the last commits on GitHub are from mid 2024 and the last installable release was 2019. It appears the main developer is working on a new thing?

There's definitely a "the bear is sticky with honey" confusion of discussion over whether it's dead or not. It would be nice for interested strangers like me if they could make some sort of clear statement on it.

evmar··on The Origins of Wokeness
This is pretty much a canonical example of what does not belong on HN. A dumb topic, and then on top of that a dumb take on that dumb topic.
evmar··on Seconds Since the Epoch
Another common computing system to be aware of: the Windows epoch is 1-Jan-1601.
evmar··on The tooth, the whole tooth and the jawbone too
(wife is a dentist)

To my knowledge, the state of the art in tooth removal still is basically pliers and a lot of force. The difference today is a trained professional knows the technique and has practiced it a lot. (And anesthetic.)

Here's a random video of it from a quick search on YouTube: https://www.youtube.com/watch?v=vydv7aomV20

evmar··on You can use C-Reduce for any language
I glanced at the code. It seems to have multiple possible "passes" which reduce the code in various ways, and the passes here not tagged with "C"=>1 are used in the not-c mode recommended in the post.

https://github.com/csmith-project/creduce/blob/31e855e290970...

You can see the pass implementation in files on the left.

evmar··on I Hate the Letter F
With Rust you could get by with "match bool { true => ..., _ => ... }" and "loop { ... break }" I think.
evmar··on Our Boundless Love for Big Sur May Be Killing It
This article is as good a place as any to share a story on this topic.

A friend from early in my career went on to become a fancy tech executive. They invited me to a party at their house in SF that included some of their fancy tech executive friends. At some point I inserted myself into a conversation they were having about buying homes in Big Sur: "But isn't it quite a long drive from here?"

They answered: "Oh, it's not so long if you take a helicopter."

The lives of the fancy are beyond my imagination!

evmar··on A good day to trie-hard: saving compute 1% at a time
This post uses a fancy data structure to construct a to_remove set, then iterates through it to remove these from the underlying header map.

It appears the "remove_header" call is this one: https://docs.rs/pingora-http/0.3.0/src/pingora_http/lib.rs.h... which calls .remove() on two other data structures, both of which bottom out in this mountain of code: https://docs.rs/http/latest/src/http/header/map.rs.html#1550

evmar··on Fixing a bug in Google Chrome as a first-time contributor
This post is really great! My biggest piece of advice to someone attempting to do the same is to browse the code via the online code browser, which has working cross referencing. (The codebase is so large it is not the sort of index you can reliably build locally...)

https://cs.chromium.org is the easy URL to remember ("cs" for "code search")

evmar··on Iconography of the X Window System: The Boot Stipple
In the early ChromeOS days when they were thinking about which graphics stack to use, the quiet but definitive top manager said, if they picked X11, that he'd better not see any stipple on boot. It's such a funny comment that stayed with me because it really captures how seeing that stipple is such a symbol of "I guess you're booting X11 now", and his insight on how it's not what he wanted the first impression of the product to be.
evmar··on The plan-execute pattern
[ninja author] I like how their example is a build system, given Ninja constructs an object literally called "Plan"[1].

However, when I later revisited the design of Ninja I found that removing the separate planning phase better reflected the dynamic nature of how builds end up working out, where you discover information during the build that impacts what work you have planned. See the "Single pass" discussion in my design notes[2], which includes some negatives of the change.

If the author reads this, in [2] I made a Rust-based Ninja rewrite that has some similar data structures to those in the blog post, you might find it interesting!

[1] https://github.com/ninja-build/ninja/blob/dcefb838534a56b262... [2] https://neugierig.org/software/blog/2022/03/n2.html

evmar··on Language models on the command line
In case it helps any, here are some more details about what I used it for. (Summary: providing examples of a specific translation task, to make it use a particular API in the output.) https://inuh.net/@evmar/112001414385042731

And what I expected of llm is for the template file to (optionally) contain an array of prompt/response pairs. You could even imagine the --save flag constructing one from an ongoing conversation of llm -c maybe.

evmar··on Language models on the command line
I am using a hacky one I wrote myself.

I looked at llm but it doesn't appear to have a mechanism for multi-shot prompting, where you provide both prompts and responses within your query. (Ref https://platform.openai.com/docs/guides/prompt-engineering/t... .) Maybe take this as a feature request?

It feels like the 'template' system in llm might be able to encompass this but the docs don't appear to provide a reference for the yaml format, only examples. I guess that is another feature request, sorry!

(BTW if you haven't seen https://docs.divio.com/documentation-system/ it really changed how I think about documentation)

evmar··on Zig vs. Rust at work: the choice we made
> Zig works with debuggers our developers know out of the box.

Is this not true of Rust? I use lldb via terminal and VSCode with Rust, I am not sure what I'm missing.

evmar··on “Attention assault” on Fandom
Not that I'm a fan of ads, but I find it interesting that this post specifically complains that the ads aren't targeted enough ("my ad was for furniture - ah yes, just what i wanted" / "i do not have a dog" / "i don't need sunscreen") when I would expect the post's author also probably objects to being profiled by ad networks.

It would be less curious if the post was saying something around like "I object to fandom monetizing at all", but also that also probably feels like a less sensible thing to say.

evmar··on Just Enough Software Architecture (2010)
I don't know this book in particular, but I know the author from their writing about "Intellectual Control", which is extremely insightful:

https://www.georgefairbanks.com/ieee-software-v37-n3-may-202...

evmar··on Microsoft's official Minesweeper app has ads, pay-to-win, and is hundreds of MBs
Yeah not fully implemented, sorry! For reasons I haven't yet looked into sometimes Minesweeper rarely calls https://learn.microsoft.com/en-us/windows/win32/api/winuser/... with the message-filtering params and I haven't implemented that part of the API...
evmar··on Microsoft's official Minesweeper app has ads, pay-to-win, and is hundreds of MBs
Since it's somewhat germane, I have gotten win2k's Minesweeper running on the web:

https://evmar.github.io/retrowin32/ , midway down the page

In contrast to the above, the x86 emulator and win32 API implementation is a little over a meg of WebAssembly, hah!

evmar··on The curious case of the missing period
> A portion of this code implemented a SMTP client.

If I wanted to root cause this, the real problem is right there. Implementing protocols correctly is hard and bugs like in the post are common. A properly implemented SMTP client library, like one you would pull off the shelf, would accept text and encode it properly per the SMTP protocol, regardless of where the periods were in the input. The templating layer shouldn't be worrying about SMTP.

evmar··on New exponent functions that make SiLU and SoftMax 2x faster, at full accuracy
In case anyone else wasn't quite following this, I think the idea is

e^x

= e^(a+b+c+d) (where abcd are the bytes of x)

= e^a * e^b * e^d * e*d

and then you make a lookup table for each of those e^a, e^b values.

(I fudged "a" here, where it's really more like "high byte << 24", but I think you just make your lookup table for e^a be a map from a => e^(a<<24), and similar for the other bytes.)

evmar··on Reasons not to take Lumina's anticavity probiotic
Babies are born without the mouth bacteria that cause cavities, and generally acquire them from their parents (e.g. kissing or sharing utensils).
evmar··on Fast linked lists
The "maybe you don't need a linked list" proposal at the bottom seems significantly better than the options presented in the post:

- almost no cost in the non-erroring path

- no extra data structures to manage

- a lot less code

I think the post would benefit from a better analysis of why this doesn't work for them.

evmar··on More info about synonyms at Google (2010)
I am happy to answer basic questions, but it's been a long time so I would probably look at the patents myself to remember how anything works.
evmar··on More info about synonyms at Google (2010)
I was on the team too, with less impact than the names you mentioned. The team filed a number of patents that describe parts of how it worked. You can query a patent search engine with terms like [baker synonyms]. Looking now I think Steve was on most of the patents and you can also gather adjacent coauthor names from there.

[I am not a fan of patents, but to the extent they have any positives they in principle serve to share knowledge about how inventions work. Also I am not a lawyer but I think patents last 20 years from filing date and these were filed ~20 years ago maybe?]

evmar··on The Seattle Public Library is reducing maximum digital holds
Does this mean they library can also "give up" their licenses once a book becomes less popular? (This is still worse than the system for physical books, but at least it lets them dial back the rent over time.)
evmar··on Show HN: Running TempleOS in user space without virtualization
Wine has a similar problem around needing to reserve the lower 32 bit address space for 32-bit executables.

I bookmarked their Mac workaround around here: https://github.com/wine-mirror/wine/blob/b2a099b3ceec6fef05c... which involves rearranging the zero page and creating a big WINE_RESERVE section.

On Linux it appears they use a -Ttext linker flag to reposition the code location, but I haven't read it too carefully: https://github.com/wine-mirror/wine/blob/b2a099b3ceec6fef05c...

evmar··on MIPS stacktrace: an unexpected journey
I have been working on an x86 emulator[1] so I have x86 on the mind. As I read the post I was thinking to myself "there's no way you can iterate the instruction stream without a massive amount of effort to parse through all different instruction types"... and then remembered MIPS has constant-sized instructions. So nice!

But also I glanced at some MIPS docs and it seems there there could be additional instructions that modify these registers as outputs, which the code doesn't address. Maybe they just don't occur in practice?

[1] https://github.com/evmar/retrowin32

evmar··on It’s getting hard to use and recommend Firefox
In the bug report a commenter says: "This doesn't affect our own [Mozilla's] builds."

I worked on Linux Chrome and over the course of doing so became pretty disillusioned about this problem in particular. In a very real sense, all a distribution does for software like this is apply patches that are not tested/supported by upstream. In other words, either the distro can ship upstream or it chooses to ship some less-tested variant.

In an ideal world upstream would be able to support all these configurations, but supporting Linux at all is already a tiny fraction of the total userbase and different Linux variants are fractions of that fraction; it's simply not realistic to expect the disproportionate effort required.

← PreviousPage 3 of 27Next →