frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Alternative Blanket Implementations for a Single Rust Trait

https://www.greyblake.com/blog/alternative-blanket-implementations-for-single-rust-trait/
35•greyblake•7mo ago

Comments

dwenzek•7mo ago
A nice model solving a quite recurring problem. However this sounds a bit as over-engineering here, as two traits have exactly the same type signature.
maybevoid•7mo ago
(Slightly hijacking this thread to share about my comment for the same post on Reddit [1])

It's great to see you exploring some foundational patterns that closely align with the principles behind my work on Context-Generic Programming (CGP).

The structure of your `BlanketAdapter` and `Adapter` traits bears a strong resemblance to the concepts of provider traits and consumer traits in CGP. In particular, your use of the `Target` type is conceptually similar to how the `CgpProvider` associated type is used within a CGP context.

To illustrate the connection, I’ve put together a CGP-based reimplementation of your example. You can see the full code below or check it out as a gist at [3].

I hope this example helps to demonstrate how CGP builds on the same design ideas but generalizes them further. With CGP, the pattern becomes applicable to any trait, and the macros helps reduce a significant amount of boilerplate.

There’s definitely room to refine the example further — for instance, by extracting `load_state` into a separate trait so it can be reused across different implementations. I decided not to go too far down that path here, just to keep the example focused and easier to follow.

[1] https://www.reddit.com/r/rust/comments/1lovjej/comment/n0qh0...

[2] https://contextgeneric.dev/

[3] https://gist.github.com/soareschen/5b520eac0e818058cedfa2fbe...

mmastrac•7mo ago
I really like this idea - I keep finding myself re-implementing something like it every time I hit the brick wall of blanket impls. I'll see if there's a good place to make use of it in some of my current work at Gel (mainly trying to develop an ergonomic system for building postgres-style wire messages right now).

Show HN: I built a free UCP checker – see if AI agents can find your store

https://ucphub.ai/ucp-store-check/
1•vladeta•44s ago•0 comments

Show HN: SVGV – A Real-Time Vector Video Format for Budget Hardware

https://github.com/thealidev/VectorVision-SVGV
1•thealidev•2m ago•0 comments

Study of 150 developers shows AI generated code no harder to maintain long term

https://www.youtube.com/watch?v=b9EbCb5A408
1•lifeisstillgood•2m ago•0 comments

Spotify now requires premium accounts for developer mode API access

https://www.neowin.net/news/spotify-now-requires-premium-accounts-for-developer-mode-api-access/
1•bundie•5m ago•0 comments

When Albert Einstein Moved to Princeton

https://twitter.com/Math_files/status/2020017485815456224
1•keepamovin•6m ago•0 comments

Agents.md as a Dark Signal

https://joshmock.com/post/2026-agents-md-as-a-dark-signal/
1•birdculture•8m ago•0 comments

System time, clocks, and their syncing in macOS

https://eclecticlight.co/2025/05/21/system-time-clocks-and-their-syncing-in-macos/
1•fanf2•10m ago•0 comments

McCLIM and 7GUIs – Part 1: The Counter

https://turtleware.eu/posts/McCLIM-and-7GUIs---Part-1-The-Counter.html
1•ramenbytes•12m ago•0 comments

So whats the next word, then? Almost-no-math intro to transformer models

https://matthias-kainer.de/blog/posts/so-whats-the-next-word-then-/
1•oesimania•13m ago•0 comments

Ed Zitron: The Hater's Guide to Microsoft

https://bsky.app/profile/edzitron.com/post/3me7ibeym2c2n
2•vintagedave•16m ago•1 comments

UK infants ill after drinking contaminated baby formula of Nestle and Danone

https://www.bbc.com/news/articles/c931rxnwn3lo
1•__natty__•17m ago•0 comments

Show HN: Android-based audio player for seniors – Homer Audio Player

https://homeraudioplayer.app
2•cinusek•17m ago•0 comments

Starter Template for Ory Kratos

https://github.com/Samuelk0nrad/docker-ory
1•samuel_0xK•19m ago•0 comments

LLMs are powerful, but enterprises are deterministic by nature

2•prateekdalal•23m ago•0 comments

Make your iPad 3 a touchscreen for your computer

https://github.com/lemonjesus/ipad-touch-screen
2•0y•28m ago•1 comments

Internationalization and Localization in the Age of Agents

https://myblog.ru/internationalization-and-localization-in-the-age-of-agents
1•xenator•28m ago•0 comments

Building a Custom Clawdbot Workflow to Automate Website Creation

https://seedance2api.org/
1•pekingzcc•31m ago•1 comments

Why the "Taiwan Dome" won't survive a Chinese attack

https://www.lowyinstitute.org/the-interpreter/why-taiwan-dome-won-t-survive-chinese-attack
2•ryan_j_naughton•31m ago•0 comments

Xkcd: Game AIs

https://xkcd.com/1002/
1•ravenical•32m ago•0 comments

Windows 11 is finally killing off legacy printer drivers in 2026

https://www.windowscentral.com/microsoft/windows-11/windows-11-finally-pulls-the-plug-on-legacy-p...
1•ValdikSS•33m ago•0 comments

From Offloading to Engagement (Study on Generative AI)

https://www.mdpi.com/2306-5729/10/11/172
1•boshomi•35m ago•1 comments

AI for People

https://justsitandgrin.im/posts/ai-for-people/
1•dive•36m ago•0 comments

Rome is studded with cannon balls (2022)

https://essenceofrome.com/rome-is-studded-with-cannon-balls
1•thomassmith65•41m ago•0 comments

8-piece tablebase development on Lichess (op1 partial)

https://lichess.org/@/Lichess/blog/op1-partial-8-piece-tablebase-available/1ptPBDpC
2•somethingp•43m ago•0 comments

US to bankroll far-right think tanks in Europe against digital laws

https://www.brusselstimes.com/1957195/us-to-fund-far-right-forces-in-europe-tbtb
3•saubeidl•44m ago•0 comments

Ask HN: Have AI companies replaced their own SaaS usage with agents?

1•tuxpenguine•47m ago•0 comments

pi-nes

https://twitter.com/thomasmustier/status/2018362041506132205
1•tosh•49m ago•0 comments

Show HN: Crew – Multi-agent orchestration tool for AI-assisted development

https://github.com/garnetliu/crew
1•gl2334•49m ago•0 comments

New hire fixed a problem so fast, their boss left to become a yoga instructor

https://www.theregister.com/2026/02/06/on_call/
1•Brajeshwar•50m ago•0 comments

Four horsemen of the AI-pocalypse line up capex bigger than Israel's GDP

https://www.theregister.com/2026/02/06/ai_capex_plans/
1•Brajeshwar•51m ago•0 comments