Better HN
topnewbestaskshowjobs
Log inSign up

dunham

2,621 karma · joined Mar 15, 2009 (17y ago) · 1,117 submissions

I'm a Seattle area software engineer. I've worked on both front end and backend for a couple of decades using C++, Java, and Typescript.

I'm interested in programming language theory, compression, and cryptography. Recently I've been helping out with the Idris2 language and wrote the dependent typed language Newt.

https://dunhamsteve.github.io

Submissions

comment 2d ago · link · parent

Do Germans use mustard on sandwiches?

comment 4d ago · link · parent

Meanwhile mozilla cancelled their PWA support for desktop. :( I was hoping PWA would help end electron bloat.

Safari desktop, however, even lets me wrap web apps like Slack that weren't coded to support PWA.

comment 1w ago · link · parent

I had an issue with my Bosch dishwasher a few years ago (last minute took forever). The internet told me it was a common problem with that model and a pin on a relay in the controller needed to be re-soldered. Fixed it without having to pull it out of the cabinet. I suspect a repairman would have replaced the entire controller and, with labor, charge the price of a new dishwasher.

My samsung fridge is in a holding pattern. It collects a little water and ice in the bottom of the fridge section. It's old enough that the plastic is getting brittle (drawers, etc), so not worth repairing (and all of the repair people I've talked to for other issues say they won't touch samsung fridges). So I shop vac it every other week.

comment 1w ago · link · parent

The two things that I'm missing in Safari are auto dark mode (re-coloring pages) and toggling javascript per-site. Currently I'm using the "Quiche" browser (paid) for that, but github is suddenly hating it (requiring a login). I like that desktop chrome lets me toggle javascript per site out of the box.

It sounds like the dark mode thing is coming in the next Safari release.

comment 3w ago · link · parent

I had a couple of those, usually for Christmas, including one with hex keys and 4-bit CPU that you could program. Much better than the "snap circuits" that the kids have these days.

comment 4w ago · link · parent

The table-driven aspect is nice when you have user defined operators. I've used it inside a combinator based parser for a language with mixfix operators (e.g. _≡⟨_⟩_ ).

Lean4 takes this to an extreme and has "syntax categories" (e.g. expression), each of which has something like a pratt parser. Ambiguity is broken by taking the option that makes the most progress, and it is made efficient by memoization. You can add syntax at compile time, down to the lexing level. There is an example that adds HTML-like syntax and uses it later in the same file.

https://github.com/leanprover/lean4/blob/0f2eaa6e776255083f9...

(I'm not saying changing the language on the fly is a good idea, but it's interesting that they pulled it off.)

comment 4w ago · link · parent

> It was around December 2023. A few other editors and I were chatting on Wikipedia’s Discord server, and we had all seen very strange articles with the same odd characteristics.

I was afraid of that. I grabbed a 2024-04-20 copy as a backup, in case it turned to slop, but I suspected it might be tainted already.

comment 1mo ago · link · parent

I still enjoy Morrowind. And I've replayed Ultima IV, although it does get grindy at one point. (For one of my play-throughs as a kid, I got the grindy part and simply boosted everybody to level 8 by editing the save file.)

But, as an adult, I don't really make the time for games anymore. I've been sitting on Baldur's Gate 3 (maybe an hour or two in) for years.

comment 1mo ago · link · parent

Have you seen this one: https://github.com/kisonecat/web2js

It's TeX in wasm implemented by writing a pascal to wasm compiler, which seemed like a novel approach. (TeX is written in pascal and typically translated to C before building.)

TeX itself is a 500kb wasm file (compresses to 90k), but the images get much bigger with things like LaTeX pre-loaded.

(The author uses it to run tikz in a browser in this repository: https://github.com/kisonecat/tikzjax)

comment 1mo ago · link · parent

I found it immediately (on a model 3) and the car started bitching at me for using the wrong door release. It took me longer to find the "correct", electronic door button.

comment 1mo ago · link · parent

Back in college I played a similar game by drawing septagons with a straightedge and compass. They're not constructable, but a length within a three significant figures is easily constructed, and that's more accurate than I am with a compass.

comment 1mo ago · link · parent

You're right. I don't see any evidence of what I claimed. It doesn't look like it was ever whitespace sensitive. This would have been in the 90's, probably Linux. I feel like the compatibility issue involved case statements, maybe it was the parenthesis thing.

comment 1mo ago · link · parent

On most news sites, the ads are annoying and the sheer weight of the third party tracking and ad javascript make them unusable.

But I've found that a lot of news sites are bearable with javascript disabled. On chrome desktop, you can do that per site via the site settings in the location bar. On iOS, I'm using Quiche browser. It's subscription, but it can disable javascript per site and has auto dark mode functionality.

comment 1mo ago · link · parent

I also remember old school bourne shell wanting tabs in some places (case statements?), but bash doesn't have that issue.

These days, I try avoid them outside of makefiles.

comment 1mo ago · link · parent

Yeah. On a similar note, without the computer aspect, I once had a prof tell me that he did not like character theory. If I remember right, there you calculate some numbers from a group and can prove some properties about it. But you gain no understanding of why those properties hold.

comment 1mo ago · link · parent

I think of those as emacs keys. Glad they work everywhere, but I suspect that someday they will go away.

comment 1mo ago · link · parent

The author of esbuild used Rust and later switched to Go. He describes some of his experience here:

https://news.ycombinator.com/item?id=22336284

It is one person and one project, but I found it interesting to read about his experience.

I like Go, but I probably would have tried Rust first because I want pattern matching when implementing languages.

comment 1mo ago · link · parent

John August has also talked about using plain text for movie/television screenplays, specifying a format based on markdown and hollywood standard: https://fountain.io/

Sharing aside, I imagine a plain text format would also be helpful for version control.

comment 2mo ago · link · parent

I also enjoyed Muse[1], which was made available in the iOS app store, and is now being maintained as "Allume"[2] (an unnamed company bought the Muse name).

Essentially a digital pinboard, it was an interesting experiment in "designed for tablet" UX and was developed far enough to be an app. The gesture based UX, nested board, PDF reader, and transclusion of PDF fragments are all interesting ideas.

[1]: https://www.inkandswitch.com/muse/ [2]: https://allume.com/

comment 2mo ago · link · parent

I'm not vegetarian, but Grand Central Bakery in Seattle/Portland had a Maitake sandwich that I loved enough to reproduce at home:

"Crisp-roasted maitake mushrooms with garlicky labneh, fresh local raab, warm Middle Eastern Spices and Mama Lil's spicy pickled peppers on a toasted Ciabatta roll."

The raab and the mushrooms (sliced into sheets) were seared crisp. I substituted harissa mixed with mayo or greek yogurt for the sauce.

comment 2mo ago · link · parent

Yeah when I'll make mashed potatoes, I mix pieces of peeled russets (which have a smoother texture) and red potatoes with the skin on. I like the taste of red potatoes and it gives the purée a rustic texture. When I peel russets, I usually fry the skins.

On the not safe front, I recently learned that volunteer squash can be very bad for you - I guess the poisonous varieties are genetically close to the edible ones.

Oh and my grandfather foraged and ate Gyromitra esculenta mushrooms. (I've eaten them as a child, I would not eat them now.) They are very bad news. The way he processed them made them safe. But he said he soaked them in salted water to "get the bugs out" - he did not know they were toxic.

comment 2mo ago · link · parent

Back in May, the iOS app "Muse" rebranded as "Allume". Their explanation was "An unexpected opportunity came up regarding the Muse name and trademarks, and as a result I'll soon be changing the name of Muse to Allumé."

comment 2mo ago · link · parent

tonksy also has some interesting opinions on syntax highlighting - not necessarily against highlighting, but taking a more minimalist stance against how highlighting is typically done: https://tonsky.me/blog/syntax-highlighting/

comment 3mo ago · link · parent

Electron requires effort to get single instance. I've had to implement it. You need to call this:

https://www.electronjs.org/docs/latest/api/app#apprequestsin...

and handle this event:

https://www.electronjs.org/docs/latest/api/app#event-second-...

I believe macos is the only OS that enforces single instance by default. If you start xterm five times on linux, you get five independent xterm processes.

comment 3mo ago · link · parent

Yeah, just the right oven. It took 90 seconds for pizza hacker in SF on a customized weber grill: https://www.mikesenese.com/DOIT/2010/05/wood-fired-pizza-on-...

comment 3mo ago · link · parent

This saved me from accidental resets in the past. I learned it existed because the files were showing up in mdfind

comment 3mo ago · link · parent

It happens when the indentation is established on the same line as other code, so having a rule that you need a newline to start indentation will avoid the issue. Examples from haskell:

    foo x y = do a <- something
                 pure somethingElse
Renaming `x` to `xxx` would push the indented block in and the subsequent lines would have to be indented too.

Similarly:

    foo x y = let a = something
                  b = anotherThing
              in somethingElse
Elm avoids this by requiring an newline after the `do` and `let` (if the `let` has multiple assignments).

Edit: This was brought to my attention by an Idris style guide that said: "Indent so that alpha conversion always works with a simple search and replace. In general this would mean starting a new line when starting a new level of indentation."

comment 3mo ago · link · parent

I don't mind indentation based languages. I used to hate them, but they've grown on me after using python, Haskell, Idris, Agda, etc. And I ended up making my own language indentation based (it is similar to Idris).

That said, it is hard-mode:

- You'll have to figure out how to parse it.

- If you want editor support, it's a pain to get tree-sitter to handle it.

- You may not be able to pull off editor operations like "rename" without implementing a pretty printer (a rename might affect indentation).

I think it is helpful for crude error recovery. On parse error, my language will simply skip to the next column 0 token and parse another declaration.

I did not do this (hindsight), but I would recommend arranging the grammar so you only get indented blocks in cases where the previous line ends in a keyword that introduces it. I think python has a trailing `:` every time indentation is introduced, and Elm does this too - in statements like `let` you need a newline after the `let` to get the multi-declaration version. (This addresses the rename issue.)

12345
38