HNHacker News
TopNewBestAskShowJobs

MrResearcher

65 karma · joined April 11, 2023

submissionscomments
MrResearcher··on Base 10 is not a good base
I vaguely remember back during my university days, the Discreet Math professor proved mathematically that base e=2.71828... was most efficient. And concluded that the optimal base would that of 3 or 2. Unfortunately, I no longer remember the basis of his argument, nor the entailing proof.
MrResearcher··on Bun 1.1
Are there any measurements or statistics how many times a particular npm package was downloaded for usage in Node.js vs Bun vs Deno?

E.g. I see 9m downloads for vite: https://www.npmjs.com/package/vite

What proportion of that is currently for Bun?

MrResearcher··on Bun 1.1
That proposal is not fully compatible with Typescript: https://github.com/tc39/proposal-type-annotations?tab=readme...
MrResearcher··on Show HN: Name That Nation
Yep, when North Korea is selected, both North Korea and South Korea are highlighted and it's not clear which country is requested. Same goes for South Korea.
MrResearcher··on PostgreSQL and FIPS Mode
How come Ed25519 is not approved?
MrResearcher··on How Rust can facilitate new contributors while decreasing vulnerabilities [pdf]
What would C look like in comparison? Is it something along this line

  *MY_GPIO |= 1;

Or more complex?
MrResearcher··on What every software developer must know about Unicode in 2023
uBlock Origin -> Disable Javascript

Problem solved!

MrResearcher··on What if OpenDocument used SQLite? (2014)
BLOBs in sqlite can be up to 2GB or less, depending on the compilation flags. If you store 2GB and the other application uses sqlite compiled with support for less than 2GB BLOB size, good luck on getting them to work... If you want to store content larger than 2GB in sqlite, you have to chunk them, manage the chunk sequences, etc. And you can't overwrite a fixed size 2KB portion at the specified offset, you'll have to rewrite the entire 2GB chunk.
MrResearcher··on “The days of using untyped languages on non-trivial projects are over.”
I came to typescript after many years of C++. I found typescript to be a much better language than C++ overall, and I'm far much more productive with typescript. I'm glad that a lot of people can manage without the types, and I've seen many successful big projects plowing along just nicely. I personally wouldn't be able to maintain a large project without types. It seems that a lot of people figured out for themselves how to do it. If you are one of them, how do you refactor the codebase? Are you relying solely on unit tests to avoid breaking all involved pieces? In Typescript I usually just go ahead and change the structure or method parameters in type-incompatible way. In many cases it's sufficient to fix all places to maintain the project in an unbroken state.

I'm looking forward to the launch of Zig, that should be a good choice for WASM. Only if I could get a pytorch-like interface in Zig now...

MrResearcher··on TypeScript please give us reflection/runtime types
Typescript already kind of has it, it's just they got it backwards.

One needs to define their types as a const, like this one:

``` [{ type: Number, name: "field1" }, { type: String, name: "field2" }] as const ```

and then use Typescript magic to convert it into the fully fledged Typescript type.

Yes, it's annoying, but it's more flexible.

MrResearcher··on Historic Tropical Cyclone Tracks (2006)
Discusses how the Coriolis force results in no hurricanes near the equator and why large ares in the south hemisphere features no hurricanes all year round.
MrResearcher··on BBEdit: Where Respect Is Due
What data structures were used to represent the content in-memory and edits? Was it some sort of an immutable set of chunks organized into a tree, similar to Word?
MrResearcher··on Ask HN: It's 2023, how do you choose between MySQL and Postgres?
Postgres doesn't have type hints and it might create a false impression of robustness until it messes up table statistics and does FULL SCAN against a table with millions of rows ignoring all indicies. It happens super rarely though, so if you run anything critical, you'll probably be down only for a few hours once a year or two. Be ready for this to happen though.

Apart from that (and noticeably higher memory consumption), Postgres is most likely preferable.

MrResearcher··on A New Theory for the Assembly of Life in the Universe
Covered in lots of details in Lex Fridman's podcast #279 https://www.youtube.com/watch?v=SFxIazwNP_0 Unfortunately, transcript isn't available.

Potentially has big practical applications as it allows for construction of chemical computers that compute through chemical reactions.

MrResearcher··on Most Polluted Cities in the U.S.
Apparently, Los Angeles is no 1.

The research is referenced in the WSJ article, which is behind a paywall: wsj.com/articles/the-places-with-the-worst-air-pollution-in-america-52ae23be

MrResearcher··on WebGPU Fundamentals
Exactly, the lack of the deep learning frameworks to train decent models on the client side forces us to use pytorch on the server, leading to centralized data collection, privacy concerns, copyright and data ownership issues.

Imagine the world where you could trivially train a model entirely on the client side, without uploading all that data to the cloud. Then we can settle on federated learning or simply use ensembles of models trained on different clients, all without sharing data with the server.

BTW, I did have some experience with ONNX, also ran into problems with some ops (like nn.SELU not working correctly in the browser - https://pytorch.org/docs/stable/generated/torch.nn.SELU.html...).

MrResearcher··on WebGPU Fundamentals
It's a pity that tfjs never truly developed any decent ops. E.g. you need lgamma to implement the cap for zero-inflated poisson regression and tfjs simply doesn't have that: https://github.com/tensorflow/tfjs/issues/2011 Those guys simply dropped the ball on the floor, and the further framework development fizzled out. I tried to find if WebGPU could be a replacement, but it's very hard to find a good description of the API surface. MDN also doesn't seem to help much – https://developer.mozilla.org/en-US/docs/Web/API/WebGPU_API I really hope that one day I'll find something similar to pytorch, only in typescript. Tell me I'll live long enough to enjoy that day.
MrResearcher··on IRS Needs to Complete Modernization Plans and Fully Address Cloud Computing
Referenced by the WSJ article, which is behind a paywall: https://www.wsj.com/articles/tax-irs-technology-gao-report-1...
MrResearcher··on FreeBSD 13.2
From https://forums.freebsd.org/threads/cuda.84926/#post-564624

> That doesn't get us full CUDA support, but we can run OpenCL apps at least (with x11/nvidia-driver, x11/linux-nvidia-libs and the nv-sglrun script from emulators/libc6-shim). And NVENC if you bother to compile it.

Why would you want to limit yourself to the operating system that cannot train, say, a pytorch model on your nvidia GPU?

We had some success running inference on CPU, which works for as long as the model isn't that large. But that doesn't scale for larger models, where you also want to batch requests and run them all at once on GPU.

← PreviousPage 2 of 2