pasxizeis
Recently it hit v3 spec conformance. (I'm executing the upstream spec test suite.)
I don't plan to make it a highly-performant decoder for use in production environments, but rather one that can be used for educational purposes, easy to read and/or debugging issues with modules. That's why I decided not to offer a streaming API, and why I'll be focusing on things like good errors, good code docs etc.
P.S. I'm new to the language so any feedback is more than welcome.
It was pretty helpful having the official spec suite available and a major boost of confidence that your parser is compliant.
Nevertheless, it was my own tests that found a regression in the latest published version of the spec[1], which shows how important it is to have a variety of implementations.
It was the first time I was writing this sort of thing, but I found the spec very clear and well-written.
Fun fact: I was surprised when the test from a toy parser surfaced a real regression in version 3 of the spec[1], released roughly 4 months before.
Currently it's fully-conformant to v2.0 of the spec, while I'm working towards implementing the recently released 3.0 version.
I plan to continue doing that in 2026.
Show HN: Wasm decoder with focus on helpful errors/diagnostics
Hey everyone! I started writing a decoder from scratch for WebAssembly modules (i.e. a parser for `.wasm` files).The primary motivation was to learn both WebAssembly _and_ a new language. However it turned out to be a very fun project, and I think there is space for a decoder with helpful error messages, that can serve as a good debugging tool or for educational purposes.A sample output can be...
But I occasionally saw one or two articles around where they explain how the binary format works, which could be a good introduction before jumping to the spec.
Recently it hit v2.0 spec conformance. 3.0 is next on the roadmap. (I'm executing it against the upstream spec test suite.)
I don't plan to make it a highly-performant decoder for use in production environments, but rather one that can be used for educational purposes, easy to read and/or debugging issues with modules. That's why I decided not to offer a streaming API, and why I'll be focusing on things like good errors, good code docs etc.
P.S. I'm new to the language so any feedback is more than welcome.
Recently it hit v2.0 spec conformance. 3.0 is next on the roadmap. (I'm executing it against the upstream spec test suite.)
My aim is probably not for it to become a highly-performant decoder for use in production environments, but rather one that can be used for educational purposes and/or debugging issues with existing modules. That's why I decided not to bother with offering a streaming API, and why I'll be focusing on things like good errors, good docs etc.
P.S. I'm new to the language so any feedback is more than welcome.
Where would you suggest someone to start if they wanted to get familiar with the codebase?
Also, what are the next steps for the project?
Recently I started executing the upstream spec tests against it, as a means to increase spec conformance. It's non-streaming, which is a non-starter for many use cases, but I'm hoping to provide a streaming API later down the road. Also, the errors interface are still very much WIP.
All that said, it's getting close to a fully-conformant one and it's been a really fun project.
P.S. I'm new to the language so any feedback is more than welcome.
Given a database[1] and a set of DDL statements/migrations you want to check, pglockanalyze will open a transaction, execute the statements, read the pg_locks view to analyze the locks they acquire and rollback (or commit, depending on the flags you passed) the transaction. Then, it will output the results for each statement.
I think there's merit in this idea, that said it's very much an experiment so there could be flaws and/or corner cases that this strategy won't work well for.
It's meant to act as a complement, not a replacement, to things like static analysis and the official Postgres docs.
https://github.com/agis/pglockanalyze
[1] typically an ephemeral database spawned by your CI pipeline
Given a database[1] and a set of DDL statements/migrations you want to check, pglockanalyze will open a transaction, execute the statements, read the pg_locks view to analyze the locks they acquire and rollback (or commit, depending on the flags you passed) the transaction. Then, it will output the results for each statement.
I think there's merit in this idea, that said it's very much an experiment so there could be flaws and/or corner cases that this strategy won't work well for.
It's meant to act as a complement, not a replacement, to things like static analysis and the official Postgres docs.
https://github.com/agis/pglockanalyze
[1] typically an ephemeral database spawned by your CI pipeline
Ask HN: Is Google Cloud Run down for anyone else?
Containers of various Cloud Run services started shutting down in a loop. GCP Support mentioned an "internal incident". Anyone else facing this?
Show HN: pglockanalyze - See the locks your Postgres migrations will acquire
https://github.com/agis/pglockanalyze
Hello! I created this tool to make reasoning about Postgres locks a bit easier.Given a database[1] and a set of DDL statements/migrations you want to check, pglockanalyze will open a transaction, execute the statements, read the pg_locks view to analyze the locks they acquire and rollback (or commit, depending on the flags you passed) the transaction. Then, it will output the results for each...
So I thought: what if, when you opened the PR, you had a tool that actually executed your migrations, saw what locks they acquired (in runtime) and then reported it as a comment to your PR? This would provide you with yet another data point you could use to reason about whether your migration is safe to deploy or not. For example:
ALTER TABLE users ADD COLUMN email TEXT:
acquired AccessExclusiveLock on relation `users`
It does this by opening a transaction, executing the statement, and observing the `pg_locks` view from _a different_ connection before the initial transaction is rolled bac (or committed, depending in the flags you passed). The idea is to be able to use it as a CLI, as a library or with a ready-made GitHub Action (which will take care of commenting in your PR).It's in early-stage and very much a PoC yet, but I think there's merit in the idea.
https://github.com/agis/pglockanalyze
P.S. Also, an excuse to learn Rust - so any feedback from Rust ppl more than welcome
The rationale being to have a "lock diagnostics report" commented in your PR's migration file.
It's a prototype and has quite some rough edges and missing functionality, but feedback is more than welcome.
Go transitioning to contiguous stacks (2014)
First time encountering this in a streaming platform so I found it interesting to share.
[1] https://open.spotify.com/track/4YPTB10Kzq7TMPrL5qHFVk?si=B8i...
Tell HN: Song on Spotify unexpectedly interleaved with another unrelated song
Do you mind sharing any particular advice on how to do this?