Hacker Newsnew | past | comments | ask | show | jobs | submit | dunham's commentslogin

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


>a rename might affect indentation

I think I need to see an example.


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


Thanks

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


I'm planning on implementing persistence in the near future, likely using some kind of generic embedded database or KV store rather than a serialization format. The primary goal would be to enable resummarization without rescanning directories and consequently, real-time updates from file notifications. However, I don't want to force persistence, since one use case for this tool is answering "why is my laptop hard drive completely full!?!?".

re: memory usage, because of the price of RAM these days, my original plan was for a hierarchical memory usage analyzer, but attribution of shared libraries on Linux isn't straightforward.

"Real" memory usage is unfortunately ill-defined since it could mean "memory freed by killing a process", "memory allocated specifically to the process", "proportional of system memory shared by other processes", etc.

Such a tool would likely need multiple subcommands to reflect how the user's intent, along with an extensive README to explain the subtleties.

To illustrate, if we only show the proportional set size in a hierarchy (e.g. IDE with LSP... I'm looking at you rust-analyzer!), but the user wants to know how much memory could be reclaimed by killing the parent process, two things could happen, as far as I understand. If it's the only hierarchy using a large chunk of shared libraries, the PSS will be pretty close. However, if other apps are using those libraries, very little memory will be freed (mostly what was allocated specifically to the killed app).

On top of that, we also have to consider swap space.

I may revisit this in the future once I have a better understanding of smaps and friends, if RAM prices don't normalize anytime soon.


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.


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.


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


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


I've found that Baldur's Gate 3 will warm up my apple silicon (everyday tasks do not).


Is that running on Rosetta 2? Rosetta 2 does (or did, maybe it's removed now) a fine job running x86 code on Apple Silicon, but boy was it cycle-hungry to do it.


Apple Silicon is not really the simultaneously silent and quiet and cool system it was in the M1 days.

If you get a MacBook Air it will get quite toasty at throttling limits. After all, it has no fan.

MacBook Pro models and Apple computers in general tend to favor quiet operation over keeping the laptop surface cool.

Many PC gaming laptops go out of their way to keep warm air off the keyboard deck with a high willingness to use fan noise to accomplish that since the assumption is that you’re resting your hands on the computer for an extended period and you have headphones on for your game anyway.


I probably should have clarified that I'm on an M1 then (a macbook pro, so there is a fan). I didn't realize the newer ones get warmer.


BG3 is a native game, they dropped x86 support shortly after launch on macOS (or maybe even in beta)


For context - the top answer was written by Bill Thurston, who was awarded a Fields Medal. (Kind of like a nobel prize for mathematics.)


Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: