Recent submissions

Comment · 1 year ago
Oh, that's pretty funny actually.

In retrospect, if I cared about getting peoples' attention I should have mentioned something about "static reflection", or positioned this as more of a direct "threat" to macro expansion (and made it opt-in instead of opt-out, I forgot how frightened people are by any new ability to infer things).

I'm just a coder, not an influencer, though I do have one additional change in mind which borders on sensationalism.

Comment · 1 year ago
It's cool to see that others have explored some of these concepts more generally, thanks for the links!

The glowstick shape is also a type-level list of integers, and I could definitely see how other shapes might be useful in different situations.

Doing this sort of thing in Rust is a bit of a stretch for sure, but it makes the outcome easy to apply which is nice.

Comment · 1 year ago
Glowstick just provides the shape types and associated traits as a layer you can put on top of another tensor implementation. Since it's just verifying shapes and forwarding the operations to the underlying tensor (e.g. from candle/burn), I don't think there's any great way to get performance benefits from these integrations. It's mainly about the developer experience- getting errors at compile time vs runtime, checking shapes, etc.

That being said, it seems reasonable that you could make some optimizations like this if you had deeper integration of these types with a framework or similar. It's not something I've explored personally, sounds interesting though.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton