···4455---
6677+# @nonbinary.computer
88+99+- Embedded (and everything else) developer, electronics designer
1010+- Utopian in the Terra Ignota sense
1111+- atproto hit me like a truck
1212+1313+---
1414+715## Spite-driven development
816917- Existing atproto libraries kinda sucked to work with
···3038---
31393240## Why Rust?
3333-3434-Only language where you can actually run it anywhere
3535-3636-and it's not a stupid idea to.
3737-3838----
3939-4040-## Why Rust?
4141-4242-- Rust has a reputation as a difficult and demanding language
4343-- That reputation is sort of deserved
4444-4545-4646----
4747-4848-## Why Rust?
4949-5041- The things Rust asks of you are things you often need to think about anyway
5142- It just makes them explicit
5243- We can make the sharp edges easier, if we care to
···59506051# "Parse, don't validate" considered harmful
61526262-If serde_json can't parse something as the type you're asking of it,
6363-6464-it will give you nothing except an error.
6565-6666----
6767-6868-# "Parse, don't validate" considered harmful
6969-7053Jacquard has its `Data<S>` type to handle some classes of this,
71547255to work with freeform data in useful ways,
···89729073# Smart constraints
91749292-- Also a bad developer experience.
9393-- All of a sudden you can't take advantage of all the nice types!
9494-- `serde_json::Value` or `ipld_core::Ipld` offers literally nothing useful beyond "this thing is valid JSON/CBOR".
7575+`Data<S>` is **less** useless but still sucks donkey balls when you wanted your type.
95769677---
97789898-# Smart constraints
9999-100100-`Data<S>` is **less useless** but still sucks donkey balls when you wanted your type.
101101-10279
1038010481---
1058210683# Smart constraints
10784108108-And that is why jacquard's handle constructor has a specific carveout for "handle.invalid"
8585+And that is why jacquard's handle constructor has a specific carveout for 'handle.invalid'
1098611087Because there's a time to follow the spec
11188···12299123100---
124101102102+## Why borrowing and lifetimes everywhere
103103+104104+105105+- Lifetimes (Jacquard, `serde_json_borrow`)
106106+- Unsafe (wrapped up, like `zerocopy` crate)
107107+- Separate borrowed/owned type variants (what Rust does)
108108+- `bytemuck` approach (`&'a Did` and `Box<Did>`)
109109+- **Borrow or Share** (available on `bos-beta` branch on tangled)
110110+111111+112112+---
113113+125114## What you're seeing
126115127116- Each dot is a Jetstream event
···136125137126- We can change that!
138127128128+
129129+139130---
140131141132## HOW?
···147138148139---
149140150150-## Thank you!
141141+## Thank you
151142152152-Questions?
143143+