HN user

michelpp

1,699 karma

https://github.com/michelp/

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

Posts49
Comments330
View on HN
github.com 8mo ago

Show HN: Redis-Automerge: CRDT Documents for Redis

michelpp
5pts0
michelp.github.io 1y ago

Show HN: Pg_doctestify Turn Postgres regression tests into Markdown

michelpp
2pts0
docs.omnigres.org 1y ago

Show HN: SQLite? Postgres? Use both with omni_SQLite

michelpp
12pts0
supabase.com 1y ago

Postgres as a Graph Database: (Ab)Using PgRouting

michelpp
164pts44
finance.yahoo.com 1y ago

Nvidia's CEO says 'useful' quantum computers are decades away

michelpp
1pts0
github.com 1y ago

Show HN: Postgres-SQLite: SQLite as first-class types in Postgres

michelpp
15pts2
fortune.com 1y ago

Steve Jobs adopted a no 'bozos' policy

michelpp
6pts1
github.com 1y ago

Show HN: OneSparse – Open Source Accelerated Sparse Linear Algebra for Postgres

michelpp
13pts3
www.hpcwire.com 1y ago

Berkeley Lab Introduces Specialized Hardware to Speed Up Sparse Computations

michelpp
2pts0
arxiv.org 2y ago

Tropical Geometry of Deep Neural Networks

michelpp
1pts0
arxiv.org 2y ago

Algorithmic Complexities in Backpropagation and Tropical Neural Networks

michelpp
2pts0
tembo.io 2y ago

Introduction to the PGXN Architecture

michelpp
2pts0
gist.github.com 2y ago

Postgres Extension Ecosystem: Jobs and Tools

michelpp
2pts0
www.youtube.com 2y ago

Sparse Matrix Algorithms (Stanford, June 2013, Tim Davis) [video]

michelpp
2pts0
www.techradar.com 2y ago

A tiny startup has helped Intel trounce AMD and Nvidia in critical AI tests

michelpp
20pts2
www.cybertec-postgresql.com 3y ago

PostgREST: Get started with automated PostgreSQL APIs

michelpp
7pts0
github.com 4y ago

Show HN: Metagration – Migrate Postgres with Postgres

michelpp
20pts0
www.ncbi.nlm.nih.gov 4y ago

Effects of Cobalt-60 Exposure on Health of Taiwan Residents

michelpp
8pts0
github.com 4y ago

Show HN: Pgsodium – A Crytographic PostgreSQL Extension

michelpp
7pts2
github.com 4y ago

Pgsodium 2.0.0: Modern cryptography for PostgreSQL

michelpp
4pts1
www.scientificamerican.com 4y ago

A Covid Vaccine for All

michelpp
4pts1
github.com 4y ago

Show HN: Signcryption Token Proposal Using Libsodium

michelpp
5pts0
github.com 4y ago

Libsodium-Signcryption: Encrypt, Authenticate, and Sign with One Keypair

michelpp
2pts0
adamwierman.com 4y ago

The Fundamentals of Heavy Tails: Properties, Emergence, & Estimation

michelpp
3pts0
github.com 4y ago

Show HN: Pgexpanded an example “expanded” C data type for Postgres

michelpp
2pts0
github.com 4y ago

Show HN: Install a local PostgreSQL Server with pip

michelpp
2pts2
github.com 5y ago

Show HN: A new Triangle Graph Centrality algorithm

michelpp
2pts0
github.com 5y ago

Show HN: Sierpiński and Other Kronecker Graphs with the GraphBLAS

michelpp
2pts0
github.com 5y ago

SuiteSparse GraphBLAS 4.0.1 Released

michelpp
2pts0
github.com 5y ago

Show HN: CoinBLAS – Bitcoin Analysis with the GraphBLAS

michelpp
12pts0

Automerge is an excellent library, with a great API, not just in Rust, but also Javascript and C.

All you need for the backend is key-value storage with range/prefix queries;

This is true, I was able to quickly put together a Redis automerge library that supports the full API, including pub/sub of changes to subscribers for a full persistent sync server [0]. I was surprised how quickly it came together. Using some LLM assistance (I'm not a frontend specialist) I was able to quickly put together a usable web demo of synchronized documents across multiple browsers using the Webdis [1] websocket support over pub/sub channels.

[0] https://github.com/michelp/redis-automerge

[1] https://webd.is/

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.

There are open source projects moving toward this scale, the GraphBLAS for example uses an algebraic formulation over compressed sparse matrix representations for graphs that is designed to be portable across many architectures, including cuda. It would be nice if companies like nivida could get more behind our efforts, as our main bottleneck is development hardware access.

To plug my project, I've wrapped the SuiteSparse GraphBLAS library in a postgres extension [1] that fluidly blends algebraic graph theory with the relational model, the main flow is to use sql to structure complex queries for starting points, and then use the graphblas to flow through the graph to the endpoints, then joining back to tables to get the relevant metadata. On cheap hetzner hardware (amd epyc 64 core) we've achieved 7 billion edges per second BFS over the largest graphs in the suitesparse collection (~10B edges). With our cuda support we hope to push that kind of performance into graphs with trillions of edges.

[1] https://github.com/OneSparse/OneSparse

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.

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)

Yep, for any decent sized graph, sparse is an absolute necessity, since a dense matrix will grow with the square of the node size, sparse matrices and sparse matrix multiplication is complex and there are multiple kernel approaches depending on density and other factors. SuiteSparse [1] handles these cases, has a kernel JIT compiler for different scenarios and graph operations, and supports CUDA as well. Worth checking out if you're into algebraic graph theory.

Using SuiteSparse and the standard GAP benchmarks, I've loaded graphs with 6 billion edges into 256GB of RAM, and can BFS that graph in under a second. [2]

[1] https://github.com/DrTimothyAldenDavis/GraphBLAS

[2] https://onesparse.com/

Not sure why this is being downvoted, it's a thoughtful comment. I too see this crisis as an opportunity to push boundaries past current architectures. Sparse models for example show a lot of promise and more closely track real biological systems. The human brain has an estimated graph density of 0.0001 to 0.001. Advances in sparse computing libraries and new hardware architectures could be key to achieving this kind of efficiency.

Automerge 3.0 12 months ago

There is also a C api wrapper, not sure the state of it wrt this latest release.

FRENCH GUARD: You don't frighten us, English pig-dogs! Go and boil your bottom, sons of a silly person. I blow my nose at you, so-called Arthur King, you and all your silly English k-nnnnniggets. Thpppppt! Thppt! Thppt!

GALAHAD: What a strange person.

Show HN: A5 1 year ago

I'm not sure about A5, but I do know that HEALPix cell boundaries are not geodesics, whereas S2 cells are always bounded by four geodesics.

While this is a good approach to implements state machines, the transition function is hardwired to one transition graph. Another approach is to generalize the state and transition graph into a table, and group those transitions by a machine id, as shown here:

https://github.com/michelp/pgfsm

Now many machines (sub-graphs of state transitions) can be defined in general, and the transition checking function checks the validity of the next state based on the table, instead of static rules in a function.

There is nothing mathematically wrong about that world

Thank you for acknowledging this. Every time Norm's work comes up on HN there is a subcurrent of comments about how his philosophy of math is wrong or dumb whose are arguments can be summed up as "Lol no infinity wtf".

Do I personally agree with his philosophy? No. But I still watched all his videos because they are entertaining, thoughtful, and his is rigorous in his definitions and examples.

I turn 50 tomorrow and I love vibe coding. In the hands of an expert with decades of experience in all the internal corners of C, Python and Postgres I find AI tools to be miracles of technology. I know how to ask them exactly what I want and I know how to separate the goodness from the bullshit. If Supabase is bringing AI closer to the developer at the database level then that is a great thing.

Main contributor here, had a lot of fun working with automerge and its amazing C API around the core Rust library and collaborating with Supabase. This allowed me to take advantage of expanded datum features and improvement in postgres 18 driven by a feature I needed for another project storing large in-memory sparse matrices [1][2]. Based on these new features, lots of rich object data model API can now be used very efficiently from sql when doing multiple complex operations in a function.

This is still experimental bleeding edge stuff that's only available on the unreleased pg 18 so far (using the current dev mainline branch) but will open up a lot of possibilities in the future. Future improvements I hope to make to pg_crdt include implementing the sync() api for easy peer-to-peer synchronization and a full round-trip example application. Word is automerge 3.0 will have some nice new features and I look forward to that.

As an HN specific side note, there was a choice to make initially to use either Rust via pgrx or the automerge C API. At the time (and maybe still?) pgrx did not support expanded datum, which I think would be an amazing addition, but it was out of my scope, and my familiarity with the postgres C extension API made us choose C. Happy to discuss further improvements in this regard as I go up the Rust learning curve myself.

[1] https://www.postgresql.org/message-id/flat/647219.1736019347...

[2] https://onesparse.com/docs.html

Sprouting is an excellent and compact way to get some fresh greens into your diet in a small space. No urine required (although I too do dump my urine on my farm hosts' compost). I live in a short school bus with less than 8sqm of space and do my sprouting in a small clear plastic tote. Every day I eat fresh sprouts, usually with something like wild-caught canned mackerel.

Thanks Paul! OneSparse author here, we're still in early dev stages (OneSparse requires some new features in postgres that won't be available until pg18) but my plan is to do a benchmark shootout with various graph tool for postgres. Initial results look good, on my 4-core 11th gen intel laptop we're getting some really good numbers!

             LiveJournal                 Orkut
  Nodes:     3,997,962                   3,072,441
  Edges:     34,681,185                  117,185,037
  Triangles: 177,820,130                 627,583,972

                  Seconds  Edges/Second  Seconds  Edges/Second
  Tri Count LL:   2.69     12,892,634    32.03    3,658,602
  Tri Count LU:   1.78     19,483,812    16.38    7,156,338
  Tri Centrality: 1.45     23,918,059    12.22    9,589,610
  Page Rank:      7.12     4,870,953     23.14    5,064,176
Orkut was as big as I could go due to limited RAM. One of my constrains is limited access to big enough hardware to do the kinds of Graphs Of Unusual Size (billions of edges, trillions of triangles) where we can really flex the scale that CUDA support gives us. Stay tuned!

Yep, it's a completely generic feature, and I'd argue the keyword 'SECURITY' is a noise word and 'LABEL' by itself would be even better, but that's what we're stuck with. As the documentation states: " PostgreSQL places no restrictions on whether or how a label provider must interpret security labels; it merely provides a mechanism for storing them."