frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Interop 2025: A Year of Convergence

https://webkit.org/blog/17808/interop-2025-review/
1•ksec•7m ago•0 comments

JobArena – Human Intuition vs. Artificial Intelligence

https://www.jobarena.ai/
1•84634E1A607A•11m ago•0 comments

Concept Artists Say Generative AI References Only Make Their Jobs Harder

https://thisweekinvideogames.com/feature/concept-artists-in-games-say-generative-ai-references-on...
1•KittenInABox•15m ago•0 comments

Show HN: PaySentry – Open-source control plane for AI agent payments

https://github.com/mkmkkkkk/paysentry
1•mkyang•17m ago•0 comments

Show HN: Moli P2P – An ephemeral, serverless image gallery (Rust and WebRTC)

https://moli-green.is/
1•ShinyaKoyano•26m ago•0 comments

The Crumbling Workflow Moat: Aggregation Theory's Final Chapter

https://twitter.com/nicbstme/status/2019149771706102022
1•SubiculumCode•31m ago•0 comments

Pax Historia – User and AI powered gaming platform

https://www.ycombinator.com/launches/PMu-pax-historia-user-ai-powered-gaming-platform
2•Osiris30•31m ago•0 comments

Show HN: I built a RAG engine to search Singaporean laws

https://github.com/adityaprasad-sudo/Explore-Singapore
1•ambitious_potat•37m ago•0 comments

Scams, Fraud, and Fake Apps: How to Protect Your Money in a Mobile-First Economy

https://blog.afrowallet.co/en_GB/tiers-app/scams-fraud-and-fake-apps-in-africa
1•jonatask•37m ago•0 comments

Porting Doom to My WebAssembly VM

https://irreducible.io/blog/porting-doom-to-wasm/
1•irreducible•38m ago•0 comments

Cognitive Style and Visual Attention in Multimodal Museum Exhibitions

https://www.mdpi.com/2075-5309/15/16/2968
1•rbanffy•39m ago•0 comments

Full-Blown Cross-Assembler in a Bash Script

https://hackaday.com/2026/02/06/full-blown-cross-assembler-in-a-bash-script/
1•grajmanu•44m ago•0 comments

Logic Puzzles: Why the Liar Is the Helpful One

https://blog.szczepan.org/blog/knights-and-knaves/
1•wasabi991011•56m ago•0 comments

Optical Combs Help Radio Telescopes Work Together

https://hackaday.com/2026/02/03/optical-combs-help-radio-telescopes-work-together/
2•toomuchtodo•1h ago•1 comments

Show HN: Myanon – fast, deterministic MySQL dump anonymizer

https://github.com/ppomes/myanon
1•pierrepomes•1h ago•0 comments

The Tao of Programming

http://www.canonical.org/~kragen/tao-of-programming.html
2•alexjplant•1h ago•0 comments

Forcing Rust: How Big Tech Lobbied the Government into a Language Mandate

https://medium.com/@ognian.milanov/forcing-rust-how-big-tech-lobbied-the-government-into-a-langua...
3•akagusu•1h ago•0 comments

PanelBench: We evaluated Cursor's Visual Editor on 89 test cases. 43 fail

https://www.tryinspector.com/blog/code-first-design-tools
2•quentinrl•1h ago•2 comments

Can You Draw Every Flag in PowerPoint? (Part 2) [video]

https://www.youtube.com/watch?v=BztF7MODsKI
1•fgclue•1h ago•0 comments

Show HN: MCP-baepsae – MCP server for iOS Simulator automation

https://github.com/oozoofrog/mcp-baepsae
1•oozoofrog•1h ago•0 comments

Make Trust Irrelevant: A Gamer's Take on Agentic AI Safety

https://github.com/Deso-PK/make-trust-irrelevant
7•DesoPK•1h ago•4 comments

Show HN: Sem – Semantic diffs and patches for Git

https://ataraxy-labs.github.io/sem/
1•rs545837•1h ago•1 comments

Hello world does not compile

https://github.com/anthropics/claudes-c-compiler/issues/1
35•mfiguiere•1h ago•20 comments

Show HN: ZigZag – A Bubble Tea-Inspired TUI Framework for Zig

https://github.com/meszmate/zigzag
3•meszmate•1h ago•0 comments

Metaphor+Metonymy: "To love that well which thou must leave ere long"(Sonnet73)

https://www.huckgutman.com/blog-1/shakespeare-sonnet-73
1•gsf_emergency_6•1h ago•0 comments

Show HN: Django N+1 Queries Checker

https://github.com/richardhapb/django-check
1•richardhapb•1h ago•1 comments

Emacs-tramp-RPC: High-performance TRAMP back end using JSON-RPC instead of shell

https://github.com/ArthurHeymans/emacs-tramp-rpc
1•todsacerdoti•1h ago•0 comments

Protocol Validation with Affine MPST in Rust

https://hibanaworks.dev
1•o8vm•1h ago•1 comments

Female Asian Elephant Calf Born at the Smithsonian National Zoo

https://www.si.edu/newsdesk/releases/female-asian-elephant-calf-born-smithsonians-national-zoo-an...
5•gmays•2h ago•1 comments

Show HN: Zest – A hands-on simulator for Staff+ system design scenarios

https://staff-engineering-simulator-880284904082.us-west1.run.app/
1•chanip0114•2h ago•1 comments
Open in hackernews

“Bypassing” specialization in Rust

https://oakchris1955.eu/posts/bypassing_specialization/
46•todsacerdoti•6mo ago

Comments

hackyhacky•6mo ago
In Haskell, we call this problem "overlapping instances," and can be allowed with an optional compiler flag. Nevertheless, I try to avoid using it, because of the potential for unforeseen consequences and reduced clarity in which code is actually being run.

In this use case, my instinct tells me that trait specialization is the wrong tool for the job. The author is trying to dispatch different functions based on a flag set in the caller. I can think of two more elegant ways to do this:

* Make the file system itself a trait, with implementations for read-only and read/write. Pass the concrete implementation as a parameter to the function using it.

* Store the capabilities as a variable in the file system object and query it at runtime. This can be done with an if.

Sometimes the simpler approach is better.

nesarkvechnep•6mo ago
Your proposal might work but then the user won’t have the compile-time guarantee that they can’t try to write to a read-only filesystem, since the capability will be queried at run-time.
dwattttt•6mo ago
I may be misunderstanding, but

> Make the file system itself a trait, with implementations for read-only and read/write

Those are separate concrete implementations between read-only and read-write; a write operation can be implemented on the read-write implementation only.

nesarkvechnep•6mo ago
If the filesystem is a trait which has a read and write method. Your concrete implementations have to implement both.
dwattttt•6mo ago
So... Don't give the trait methods that don't apply to every member of the trait. Only implement write methods on the concrete Write implementation.
nesarkvechnep•6mo ago
So… you lose the ability to have a generic parameter which implements the trait. You need to know the concrete implementation in order to know if there’s a write method, for example.
dwattttt•6mo ago
It doesn't sound like they're making multiple implementations that can write? If they were, they could make a trait for a Writable fs.

But from their description it sounded like exactly two concrete implementations, one read-only, one read-write. If you want to share code or implementations, there's lots of ways still. For example, if the read-write filesystem implementation is a superset of the read-only, put a read-only struct inside the read-write.

konstantinua00•6mo ago
can't it be solved by negative traits?

isn't the problem that rw is still r, so passes checks for both?

can't you make one rw and the other r(-w)?

SkiFire13•6mo ago
Note that negative traits are not for "this trait is not implemented" (i.e. a missing `impl Trait for Type`) but instead for "this trait is guaranteed to not be implemented" (i.e. `impl !Trait for Type`)
konstantinua00•6mo ago
aka that's what read-only is for write?
maybevoid•6mo ago
With Context-Generic Programming (CGP), there is a way to get around the coherence restriction through a provider trait, and have overlapping implementations in safe, stable Rust. I have a proof of concept implementation of example in the article here: https://gist.github.com/soareschen/d37d74b26ecd0709517a80a3f...
maybevoid•6mo ago
For those who are new to the concept, in a nutshell, CGP allows you to bypass the coherence restrictions in traits/typeclasses, and define multiple overlapping and generic implementations for each CGP trait. As a consequence, when you define a new type, you need to specifically choose an implementation to be used with that type. This is called a wiring step, where you choose the provider implementations for your context.

On the surface, this addition doesn't seem significant. However, it opens up a world of possibilities for enabling powerful design patterns that are based on trait implementations that are named, generic, and overlappable. One of the greatest strengths of CGP is to enable safe, zero-cost, compile-time dispatching through the trait system to accomplish the things that in OOP would typically require dynamic dispatch with runtime errors.

ta8645•6mo ago
For anyone interested in reading about CGP in Rust, here is the website:

https://contextgeneric.dev/

Just a FYI from their main page:

As of 2025, CGP remains in its early stages of development. While promising, it still has several rough edges, particularly in areas such as documentation, tooling, debugging techniques, community support, and ecosystem maturity.

...

At this stage, CGP is best suited for early adopters and potential contributors who are willing to experiment and help shape its future.

quotemstr•6mo ago
Clever work. I'm glad to see Rust is at the AbstractSingletonProxyFactoryBean stage of its lifecycle.

Look: patterns like this might unblock people locally but they point to a gap between what people want to say and what the base language allows them to express. In the long term, it's better to expand the language than devise increasingly heroic workarounds for syntactic sclerosis.

SkiFire13•6mo ago
> Lastly, the unstable specialization feature also deals with lifetimes, which as I mentioned is the feature's biggest obstacle on the way to stabilization.

The issue is really that `specialization` *has* to deal with lifetimes, even when there is apparently none. The example core with `Read` and `Read + Seek` also suffers from lifetime issues: some type could implement `Seek` depending on some lifetime and this would make your specialization unsound. For this reason `min_specialization` does not accept your specialization.

ozgrakkurt•6mo ago
Isn’t it possible to just use trait objects for this?

You can have default implementation for some methods and implementors of the trait can specialise.

Specifically, you can have couple functions that takes a type that implements some stuff (different based on the wanted specialisation) and gives you a trait object.

This should be simpler and should have better compile time than doing macros or adding more generics

j-krieger•6mo ago
The length Rust programmers will go to avoid writing `Box<dyn Trait>` is astonishing. The heap is there for a reason :)
alfiedotwtf•6mo ago
I’m guilty of this… I’ve doing using Rust for 10 years, and I’ve only ever used `Box<dyn>` maybe 4 times all up.

.. yep, I’ll try everything before introducing virtual functions just out of warm fuzzies rather than anything measurable

ccleve•6mo ago
The performance hit you take for doing dynamic dispatch is real and measurable. It's a no-go if you're in a performance sensitive part of your app.
j-krieger•6mo ago
I write rust for no_std embedded devices and I just use stack_dst for this :)

Of course you‘re right if you can‘t alloc, you can‘t use Box or similar stuff.

Also you can avoid a lot of performance hits if you just implement most stuff on the dyn Trait directly!

surajrmal•6mo ago
Sure but most code paths are not hot. This is definitely premature optimization at the expense of everything else.