2,621 karma · joined Mar 15, 2009 (17y ago) · 1,117 submissions
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
comment 1w ago · link · parent
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
It sounds like the dark mode thing is coming in the next Safari release.
comment 4w ago · link · parent
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
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
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
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
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
comment 1mo ago · link · parent
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
Sharing aside, I imagine a plain text format would also be helpful for version control.
comment 2mo ago · link · parent
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
"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
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
comment 3mo ago · link · parent
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
comment 3mo ago · link · parent
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
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.)