michelpp

Joined 8 years ago

Karma
1,699
Submissions
390
Member since
Feb 27
https://github.com/michelp/

Get my name on github, email is last.first @ gmail

View on Hacker News

Recent submissions

Comment · 10 months ago
Comment · 11 months ago
Comment · 11 months ago
I caught covid for the first time in jan of 2024, the illness itself wasn't that bad for me, like a common cold, but the aftereffects lingered for months. Eventually my ability to smell and taste came back in a few weeks, but the mental brain fog would not let go. I would sleep over 12 hours a night and still be tired. According to my fitness tracker my daily step and energy burn counts were cut in half. It was so bad I forgot my own phone number at one point and my gmail password. Looking at a screen of code was impossible, I couldn't focus for more than a few seconds. My friends commented on the noticeable changes in my acuity and behavior.

Based on some online anecdotal evidence, I decided to try nicotine "therapy". I bought 4mg smoking cessation mints, cut them in half with a pill cutter, and took 10-12 2mg doses per day at roughly one hour intervals. The effect was immediate and brain fog lifted in less than a week. It was like coming out of a long dream, or like I had been stoned for six months and then suddenly I was sober again. My fitness stats have exceeded where I was before I got sick.

This is just my own anecdotal experience, and there have definitely been some downsides. The mints are about $50/month. My dosage has ticked up a bit and I'm certainly addicted, at least once a day I take a full mint instead of a half for an extra kick. I'd like to taper off, but I'm not sure if I do how to know if any effects are withdrawal or resumption of the covid brain fog. I have a light caffeine habit (2 cups every morning) and I don't see the mints being any more harmful than the coffee, so I think I'm just going to stick with it.

Comment · 11 months ago
Comment · 1 year ago
Comment · 1 year ago
uuidv8 does not contain a timestamp or counter unless you put them in there, it only contains a version and variant field. It's a very broad format that lets you contain whatever bits you want.

This library converts a uuidv7 into a cryptographically random but deterministic uuidv4 recoverable with a shared key. For all intents and purposes the external view is a uuidv4, the internal representation is a v7, which has better index block locality and orderability.

Comment · 1 year ago
That still exposes the timestamp, and the shift just drops precision, so I'm not sure what you're going for here.
Comment · 1 year ago
Because then you leak the timestamp. The idea is, present what looks like v4 random uuids externally, but they are stored internally with v7 which greatly improves locality and index usability. The conversion back and forth happens with a secret key.
Comment · 1 year ago
You're right, I did read the article before commenting, but I see your point that I didn't completely understand the intent.
Comment · 1 year ago
Fair enough, showing my age with "impossible".

But still true that dense growth is not linear but quadratic to the number of nodes.

Comment · 1 year ago
It's an interesting exploration of ideas, but there are some issues with this article. Worth noting that it does describe it's approach as "simple and naive", so take my comments below to be corrections and/or pointers into the practical and complex issues on this topic.

- The article says adjacency matrices are "usually dense" but that's not true at all, most graph are sparse to very sparse. In a social network with billions of people, the average out degree might be 100. The internet is another example of a very sparse graph, billions of nodes but most nodes have at most one or maybe two direct connections.

- Storing a dense matrix means it can only work with very small graphs, a graph with one million nodes would require one-million-squared memory elements, not possible.

- Most of the elements in the matrix would be "zero", but you're still storing them, and when you do matrix multiplication (one step in a BFS across the graph) you're still wasting energy moving, caching, and multiplying/adding mostly zeros. It's very inefficient.

- Minor nit, it says the diagonal is empty because nodes are already connected to themselves, this isn't correct by theory, self edges are definitely a thing. There's a reason the main diagonal is called "the identity".

- Not every graph algebra uses the numeric "zero" to mean zero, for tropical algebras (min/max) the additive identity is positive/negative infinity. Zero is a valid value in those algebras.

I don't mean to diss on the idea, it's a good way to dip a toe into the math and computer science behind algebraic graph theory, but in production or for anything but the smallest (and densest) graphs, a sparse graph algebra library like SuiteSparse would be the most appropriate.

SuiteSparse is used in MATLAB (A .* B calls SuiteSparse), FalkorDB, python-graphblas, OneSparse (postgres library) and many other libraries. The author Tim Davis from TAMU is a leading expert in this field of research.

(I'm a GraphBLAS contributor and author of OneSparse)

Comment · 1 year ago
Comment · 1 year ago
Comment · 1 year ago
Beautiful, a great intro to and reference to core concepts. Definitely keeping this one around for mental refresh!

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton