News for hackers. Stuff that matters.

dunham

Re:Writing about pratt parsing so I remember it on Tuesday October 27, 2026 @11:33AM (#50260887)
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.)

Re:Wikipedia's Cleanup of AI-Generated Content on Tuesday October 27, 2026 @09:58AM (#50259453)
> 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.

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.

Re:Shipping a LaTeX Compiler Behind an Edge App on Tuesday October 20, 2026 @09:12PM (#50174871)
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)

Re:Tesla Roadster on Friday October 16, 2026 @07:57PM (#50126376)
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.
Re:Neural Networks Are Already Clean on Friday October 16, 2026 @11:02AM (#50119241)
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.
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.
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.

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.

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.
Re:Keyboard differences between Windows and Macs on Friday October 09, 2026 @10:46AM (#50021275)
I think of those as emacs keys. Glad they work everywhere, but I suspect that someday they will go away.
Re:Rust Port of TypeScript (Tsc) on Wednesday October 07, 2026 @09:52PM (#50001097)
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.

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.

Re:Ink and Switch Interactive Homepage on Friday September 25, 2026 @10:02AM (#49844822)
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/

Re:Enjoy Every Sandwich on Thursday September 24, 2026 @10:43AM (#49831350)
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.

Re:Eating Fruit Skins on Saturday September 12, 2026 @10:08PM (#49679239)
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.

Re:Muse's Social Media Handle Is Stolen by New Meta AI Tool on Wednesday September 09, 2026 @11:14PM (#49637935)
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é."
Re:A curmudgeon tries a language server on Thursday August 27, 2026 @06:17PM (#49472022)
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/
Re:Stop Making TUIs on Saturday August 22, 2026 @11:20AM (#49400675)
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.

Re:The Debt That Apple Owes to the CIA on Thursday August 20, 2026 @10:50PM (#49383135)
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-...
Re:Zed DeltaDB on Wednesday August 05, 2026 @04:25PM (#49188496)
This saved me from accidental resets in the past. I learned it existed because the files were showing up in mdfind
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."

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.)

That looks like a nice tool. It would be helpful if it could optionally run off of a data file. I've used "ncdu" to visualize my restic backups by writing a script that generates the ncdu data format, and more recently I've abused ncdu to visualize process memory usage on macos:

https://gist.github.com/dunhamsteve/59f5e6b9a4bc69039853674d...

Re:Road to Elm 1.0 on Monday July 06, 2026 @01:30PM (#48807843)
Not exactly removed, the feature was still there, but could be used only if your module was in Elm namespace (the compiler checked). It was kind of a "no soup for you" situation, which bothered me.

Elm served its purpose for me - an example of a small language with great tooling and error messages. And the strictness was helpful in learning to do things the "proper" way in the Elm model, even if I did reach for escape hatches in later projects. E.g. writing a notion-like application in Elm, I had to walk through my data twice - once to render it and another time to collect cache misses. With hyperapp, I broke purity a little and accumulated the information on the side.

Re:Learn Vim motions with an ice-cream van on Thursday July 02, 2026 @10:06AM (#48761856)
On the last exercise of world 6, rewrite the highlight, "cw" leaves the "a" at the end of the line. Both "c$" and "C" work. I didn't know about "C" until I read the web page - I've been using c$ for that.
Re:LaTeX.wasm: LaTeX Engines in Browsers on Friday June 26, 2026 @02:26PM (#48690146)
Is this related to web2js[1], which has been around for a while? It compiles the pascal code of TeX to wasm.

It looks like the live demo is no longer up, but it did run latex in the browser and render the dvi output to html. The wasm for TeX is about 495kb / 88kb compressed, but the memory image for LaTeX was a bit larger.

[1]: https://github.com/kisonecat/web2js

Re:Stealing Is a Skill on Wednesday June 24, 2026 @05:55PM (#48666077)
> God I miss the old internet.

I recently discovered that the author of gzip still retains that 90's feel on his home page: http://gailly.net/

Back in the 90's I had a Matrox card that would crash the machine if the hardware cursor changed at the wrong time. I think it was related to VBI, but it's been a while.

Linux resolved this issue, but to work around it on windows, I changed my cursor to an animated dinosaur, which was built into the OS and had the side-effect of disabling the hardware cursor.

ublock origin lite is blocking a bunch of stuff for me, and things are unbearable when I turn it off.

For many sites, especially news sites, I toggle javascript off. It's reasonably easy to do per site in chrome (click left of location bar and "site settings"). I don't know if there is an easy way to do this per site in firefox.

So far I've stuck with chrome for a few reasons:

- Mozilla doesn't implement desktop PWA and has cancelled the project. I use this. - Mozilla was using about twice as much memory as chrome. (I need to revisit this, Chrome seems to have gotten fatter.) - Safari is a royal pain to write your own extensions (last I checked you need to create an application and bundle the extension into it). - I like the multiple profiles in Chrome to sandbox things like my google login. There may be a firefox equivalent, however.

Older »