Mock – An API creation and testing utility: Examples
Hacker News (score: 11)Description
More from Hacker
Show HN: Era – Open-source local sandbox for AI agents
Show HN: Era – Open-source local sandbox for AI agents Just watched this video by ThePrimeagen (<a href="https://www.youtube.com/watch?v=efwDZw7l2Nk" rel="nofollow">https://www.youtube.com/watch?v=efwDZw7l2Nk</a>) about attackers jailbreaking Claude to run cyber attacks. The core issue: AI agents need isolation.<p>We built ERA to fix this – local microVM-based sandboxing for AI-generated code with hardware-level security. Think containers, but safer. Such attacks wouldn't touch your host if running in ERA.<p>GitHub: <a href="https://github.com/BinSquare/ERA" rel="nofollow">https://github.com/BinSquare/ERA</a><p>Quick start: <a href="https://github.com/BinSquare/ERA/tree/main/era-agent/tutorials" rel="nofollow">https://github.com/BinSquare/ERA/tree/main/era-agent/tutoria...</a><p>Would love your thoughts and feedback!
Show HN: I wrote a minimal memory allocator in C
Show HN: I wrote a minimal memory allocator in C A fun toy memory allocator (not thread safe, that's a future TODO). I also wanted to explain how I approached it, so I also wrote a tutorial blog post (~20 minute read) covering the code which you can find the link to in the README.
Show HN: Tangent – Security log pipeline powered by WASM
Show HN: Tangent – Security log pipeline powered by WASM Hi HN! We’re Ethan and Danny, the authors of Tangent (<a href="https://github.com/telophasehq/tangent" rel="nofollow">https://github.com/telophasehq/tangent</a>), a Rust-based log pipeline where all normalization, enrichment, and detection logic runs as WASM plugins.<p>We kept seeing the same problems in the OCSF (<a href="https://ocsf.io" rel="nofollow">https://ocsf.io</a>) community: 1) Schemas change constantly. Large companies have whole teams dedicated to keeping vendor→OCSF mappings up to date. 2) There’s no shared library of mappings, so everyone recreates the same work. 3) Writing mappers is tedious, repetitive work. 4) Most pipelines use proprietary DSLs that are hard to share and hard for tools/LLMs to generate.<p>Tangent takes a different approach: no DSLs – mappings and enrichments are just normal code compiled to WASM, shareable plugins – we maintain a community library (<a href="https://github.com/telophasehq/tangent-plugins" rel="nofollow">https://github.com/telophasehq/tangent-plugins</a>), interoperability – we can run other engines’ DSLs (e.g., Bloblang) inside WASM for easy migration, full flexibility – plugins can validate schemas, call external APIs (<a href="https://github.com/telophasehq/tangent/blob/main/examples/enrichment/main.go#L58" rel="nofollow">https://github.com/telophasehq/tangent/blob/main/examples/en...</a>), or perform complex transforms (<a href="https://github.com/telophasehq/tangent-plugins/blob/main/zeek-ocsf/conn/main.go#L312" rel="nofollow">https://github.com/telophasehq/tangent-plugins/blob/main/zee...</a>).<p>Here's an example Python transformation plugin to drop all fields from a log except `message`:<p><pre><code> import json from typing import List from wit_world.imports import log # `log.Logview` is Tangent's zero-copy JSON accessor type. def process_logs(self, logs: List[log.Logview]) -> bytes: out = bytearray() for lv in logs: msg = lv.get("msg") value = msg.value if msg is not None else "" out.extend(json.dumps({"message": value}).encode() + b"\n") return bytes(out) </code></pre> We have plenty more examples in the repo.<p>Because plugins are just Go/Python/Rust, LLMs can create new mappers with ease. For example, I asked:<p><pre><code> Generate a mapper from AWS Security Hub Finding to OCSF </code></pre> and only had to make a few minor tweaks. (<a href="https://github.com/telophasehq/tangent-plugins/blob/main/aws-ocsf/security_hub/main.go" rel="nofollow">https://github.com/telophasehq/tangent-plugins/blob/main/aws...</a>)<p>Performance-wise, a 16-core Amazon Linux box processes ~480 MB/s end-to-end (TCP → Rust-WASM transform → sink) on ~100-byte JSON logs. The CLI includes tooling to scaffold, test, and benchmark plugins locally. Here's a deep dive into how we are able to get this performance: <a href="https://docs.telophasehq.com/runtime" rel="nofollow">https://docs.telophasehq.com/runtime</a>.<p>We’d love to get your feedback! What do you think?
Listen to Database Changes Through the Postgres WAL
Listen to Database Changes Through the Postgres WAL
No other tools from this source yet.