Okay. Yeah. So I'm Orual, and um Jacard is the atproto library that that I wrote. And yeah. First, we're gonna do a bit about me. I'm an embedded and at this point, everything else developer, I design electronics. Topian atproto kind of hit me like a truck, like it did a lot of people here. And yeah, got kind of yeah, very, very into it. Uh trying to figure out something that felt right to contribute to the Atmosphere, a bunch of different things. Um and yeah, this is Jacquard and a few different things that are I've done or what you yeah, what you might call spite-driven development.
This was a point where yeah, we had ex like there were plenty of atproto libraries at the time, but they all kinda suck to work with at the especially back when I started. There were a couple of notable exceptions, but none of them were in Rust, which was my language of choice for a bunch of reasons which I'll get into. I ended up putting one another project on hold because I got frustrated, and some other friends had similar frustrations. And yeah, a lot of this came down to how's that? Oh, I gotta be on. There we go.
Yeah, like a lot of this came down to issues with code generation. From yeah, from lexicons, GraphQL, everything, everything you generate, you you have how you specify what you want, and then you need code that does that. You either handwrite it or more likely you generate it from some state, be that JSON, be that GraphQL, be that whatever. And unfortunately, most of these fucking suck. You end up so you generate all the you generate all your your bindings. You spend uh way more time or these days LLM tokens writing code around them to make them actually usable.
And yeah, um this isn't just an app proto problem, but it is it hurts more here, both because lexicons and like a lot of them, and especially in the ecosystem for people wanting to not just play in Bluesky sandbox. But we do not have to live like this. And in as much as this talk is about the thing that I'm doing, it's also a no, this is something everybody else can do in whatever language, whatever you can we can do this better, especially now. And hang on. Uh yeah. And so yeah, it's like why Rust for me, like this was my language, and it is kind of at this point the only language you can run it base lit up like literally pretty much anywhere, and it's actually not completely stupid.
Like there's like you can run a lot of things a lot of places, but there's diff there you would be hard to find defensible reasons. You can at least find defensible reasons for Rust. Although there's if you're running Rust on your full stack, you better be a my kind of pervert. Yeah. And so yeah, it has a excuse me. Uh it has a reputation as a difficult and demanding language. This the reputation is sort of deserved and sort of not. Um and of course a lot of Rust libraries go a long way to improving on that state.
And of course, yeah, it's like one of the reasons why I am a fan of it is that essentially like especially coming from me from the C world, the things Rust forces you to think of, the things that people consider demanding difficult of the things you need to think of anyway, and it makes them explicit. And of course, like the whole point. We can make the sharp edges easier if we care to. And yeah. Um again, we do not have to live like this. And of course, and this is a thing, this is peripheral to sort of the the whole talk, but this is one of the things that I came out r ran into that I didn't necessarily expect in the development of Jacard.
And is basically parse don't validate can only take you so far. This is kind of a truism that you get, and it's especi and especially among Rust devs, among functional programmers. But the thing is is that like there's a there's a limit, especially in depending on how your language handles errors. Yeah, if Surday JSON or Survey COR can't parse something as the type you're asking of it, you will just get an error. It does not give you the partial. And this is not something that I've got a good solution for, but it also affects but the that lack of good solution for it gets us to a different place.
And hang on. I just got. And so yeah. And so yeah, it's like Atrium previous go to output or Rust crate, they had typed numbers. The number, it wasn't just int 60 i64, i32, i8. It had a uh it would have a type, and that type encoded the limits, which is cool. It's very uh it's very interesting. In theory, in practice, it's a huge pain in the ass, and this is partially the fault of Rust. Rust type system does not handle that very well. Um Jacquard until recently mostly just put these as code comments and generated APIs, it's fixed that.
Um yeah, it's kind of the thing. And yeah. And of course, one of the challenges is like you've got methods for partial understanding. And this is something that I've really tried to push as far as possible in in this without where you can have arbitrary data, and I will tell you that that's a lot of what's going on in the back end here. And I'll show and I'll show you more about that in a minute. Where'd the where'd the timeline go? Oh, uh so off of that. Anywho, um, but yeah, so it's like Jacquard has a data type which is atproto informed.
It uh it says all of this, it tries to derive, understand just by looking at the JSON or CBOR what what it is, what it's likely to be, and to work with reform data in useful ways, but doesn't of course handle the scenario where you have something that almost fits but doesn't. For example, you have a and you're I I already showed you in the next slide, but or the next bit. Um for example, you have a whole feed of posts and one of them has an invalid handle. One of them had or something, yeah, something else that doesn't validate, but the handle is the really common one.
And yeah, this was this was dirt down from a downstream of a GitHub issue I got early on in the development. And yeah, it's like it's just a shitty developer, shitty developer experience, a shitty user experience to have to do that because you fall back, you have to fall back, you don't have all your like you yeah, it's like in Jacquard you would have this, which is good, but it's still not your type, you have to do all this extra work. Um yeah. And so yeah, it's like that is for example why Jacquard has a a carve out for the specific invalid handle, and there's a few other things like that in the library, and it's like the and the decision of when to do that versus not has been a fun thing.
It's time to follow the spec, and there's a time to refrain. And yeah.
And so yeah, it's like as much as and so this is sort of yeah, it's like my pitch, obviously for my thing, and I think everybody else can like this is like we're all getting better at this in this ecosystem, but we can go so we can go so much further. It's like you have stuff that does your does the does the work that it can for you, make it very, very open op easy pluggable, so that's in the in the Rust case, this is everything is traits, everything is generic, but not generic in a way that screws that is a lot of work, has good defaults.
And then yeah, obviously for me is like API code gen that you can just work with. Like it ends up being reasonably pretty as of a few weeks ago. And yeah, Jacquard, if you're familiar with Rust, you know lifetimes. Life times are everybody's favorite thing, and they're important, but they're also one of the things that I got the most comments on. Is like this makes this harder, and I didn't want to have that be a barrier. And yeah, honestly, it's funny because like I didn't actually anticip I knew sort of when I started writing the library that picking this would picking this fight would be a barrier, but I kind of assumed everybody would figure it out.
And I also couldn't all and it also honestly I didn't I hadn't figured out a good way around it until amazingly I was looking through some of Fig's code and found a really interesting really interesting library there, which we'll discuss in a moment. Um oh, before I go back to that, what you're seeing in the background we'll catch up to real time here, and we'll see. This is the time helix. It was like I got ner it's like this so amusingly. This was, yeah, it's like I was wanting to do some sort of some sort of visualization.
And not sure exactly how to end up. And this was this was where I landed because somebody posted this and just like kind of nerd sniped the hell out of me. And so this is Jetstream. This is everything coming in well is one in ten of everything of everything of blue skies, everything of everything else. And yeah. So you can see and you can see how as we go here, like as whatever I'm mousing over, shows things. And so this is actually again, yeah. So this is hitting these like obviously some of the data is in the gestream data itself, but then it's also pulling on the refs and of course constellation fig photo for the win, getting some of that, and yeah, and and again is like doing kind of as generic like a generic UI thing.
And the fun thing is that let me get back over here and see if the see if we can make this happen. Because you've seen me editing text, and that's how I've been editing the slides. Um if I I will probably break something, but we'll see. Yeah. Um let's see. Because yeah, this is all running on this very, very hardworking little i5 here. So on the conference Wi-Fi, so I'm impressed it's held up as well as it has. But yeah, and so yeah, as you can go, yeah. So you can, yeah, it's like it hits the Bluesky op view to get the profiles just because that was easy.
Um I'm finding I am trying to find my damn. Yeah. Okay. Yeah, no, I'm not gonna I'm not gonna I'm not gonna go way too far into this. But yeah. You can get and yeah, you can like change things. And yeah, it's like a lot of this is so what yeah. So what this actually is, this is bevy game engine. Like this is like bare UI library just rendering all the slides. And I can, and yeah, it's like it's hot reloading everything from the disk. And so everything sort of streams there. And because yeah, like the other fun things.
And so, yeah, it's like this was something just like over a couple weeks and kind of go, and but yeah, and this is all sort of very straightforward. And a lot of this is as easy as it is because of services, because of tools everybody else has built here. Like we everybody in this ecosystem stands on the shoulders of giants. And yeah. You are making a dentist slingshot metrics. I bet. I I I bet I am right now. I'm very sorry. I will know it. Okay. Yeah, I I wasn't sure how badly that would show up because yeah, I am hitting that for of quite a lot.
Yeah, yeah. All right, yeah. And oh, yeah, the other thing. Um I'm gonna, yeah, one more because yeah, this was like I was saying, it's like with the borrowing. Uh yes, I keep forgetting I need to get the window back in focus. Uh there we see. So yeah, it's like this is why like you ended up with the borrowing. It's like there's like you can either do unsafe in Rust, you can do separate borrowed own types, and then you so you end up, okay. So now Rust is language that has eight types of strings in the default.
So yeah, that plus however many uh proto lexicons, that didn't feel achievable. Then there's a like kind of like ByteMUC, or then there's the borrower share, which was the thing that I found. And so, yeah. Jacquard is getting some fun things like that that made this all possible in the sense that it's oh, yeah, it's a little harder. And let me let me pull something over from my display here. So yeah, this is this is the presentation. There's the slides. Some QR code. And yeah, a lot of this is bevy. This is very fun. But yeah, and then kind of hit.
Yeah. And so actually this uh provides, let me let me minimize this. How how big is the font here? Is this too small or too large? Okay. So yeah, um, and this is actually kind of a good good illustration because Jacquard provides uh a t a web socket client, uh runs on the Tokyo runtime. Um Bevy doesn't really like that, so this is a basically real reimplementation on the small async runtime. It's like one little source file, because it's a very simple trait, and then you can immediately plug in everything else in Jacquard. Just pick that one bit out.
There you go. And I didn't end up using this. Oh, we'll get to that. I didn't end up using this because I ended I did end up using Tokyo and request, but this, uh but of course Bevi's sync bevy is uh not async friendly, which makes a lot of sense for as a game engine. But you can just do yeah, so again, this is another like Jacquard has a client trait, and this is an implementation of it, and then on top of that, there is a sync trait and a polling version of it that supports and again it follows in the same pattern, so you interact with it pretty much the same way, and yeah, it's like this is sort of example wise and not intended for like use, but you get the idea for yeah, it's like this is this is why I like what I've built, because it makes this kind of thing a lot more straightforward than it would have been otherwise.
Because yeah, like if I don't know any yeah, is like anybody else working in some like with some of the others is like okay, so I want to color outside the lines, how do I color inside the lines? The goal is to for that to be easy and but for coloring inside the lines to be rewarding. So yeah. And so yeah. Um that's that's kind of my presentation. I don't know how uh I've got lots of time. But I figured, yeah. Yeah, we've got lots of time for questions, so does does anyone have any? Yeah. Yes.
Uh just wait, so the streamers can hear.
I'm actually wondering about your background there. This was I saw on the Bluesky someone posted. About vibe coding something like this.
Oh cool. That's pretty neat though.
And honestly, that's like I will say for if I can kind of there's a lot of thought that goes into especially in Jacard itself what you do in terms of LLMs and in terms of okay. This is like how you how do you maintain a quality, how you maintain and honestly I can write much because they're not good enough. Oh, that one stuff with it? Oh, by accident. How do I how do I turn it back on? Uh there's a little switch. Yeah. Oh, sorry, there we go. My bad. Yeah. Just how the table up line.
Right. Um, yeah. And so um how how far back uh was that turned off? I try and we just want to move on. Anyway, yeah. Okay. Uh next question. I saw a few more hands here. Yeah. Yes. So cool. I want to know like what are the kind of recursive helices in your visualization represent. Um it's basically intervals of time. This is like the largest is I want to say uh how what did what did I end up? What did we end up with here? Yeah, so it's like you ended up with like subsecond level time, and then you ended up with like about yeah, it's like kind of seconds, minutes, subsecond.
Yeah. Because of course JStream is so fast. And if you notice when the when you have the slides, when you have the slides up, it slows down and you see it go past and then pull the slides down, it catches back up. And you can also pause. You can go back here for around. This gets a little laggy as it pulls things in, but yeah. There's an SQLite database that pull that this is all all gets dumped into for all the past events. Yeah. Um the colors are different lexicons, actually. So it's yeah, it's like all it's mostly the common ones, and then it's like you see the little or see the little yellow ones.
Those are non-blue sky lexicons. Most of them will be account events. That's the common one. One thing that I've one thing that I'm curious about, and actually let's go look. Yeah, let's go. Let's can we get back. There was a there we go, we got we got there. There's this little I I keep seeing these little clusters where it's like a bunch of yeah, there follows. Yeah, I wonder if this is like somebody subscribing to a starter pack. Could be. Or bots. Definitely could be bots. All the blue wave people following 20,000 people. Yeah. I'm just like I wonder if you could like just talk to like how at a high level um it kind of is using jacard like in visualization.
See honestly, this is this is very high. Yeah, so this is pretty high level in the sense that like uh like I said, I like I did re-implement a couple of the traits because I I needed to. But in terms of where is it? Yeah, it's like this is this is most this is the spot that has a hit. A bunch of Jacard stuff. And there you're gonna scroll through a bunch of bevy UI stuff here. But you can see this is yeah, it's like jet stream messages, and then pulling out. And a lot of this is like using kind of the partial understanding stuff, Jacquards arbitrary data type.
Um, and you can kind of uh where is it going? But yeah, and it pulls out embeds. And actually, where did that go? Um I had that. Uh because I did in here. I am trying to find it, but I also just don't want to like try to like control F for it. Uh and it's yeah, uh Yeah, okay, yeah. So this is uh this is a fun one. So this is the response types for constellation. Uh yeah, and this is a struct for it, DID collection archy. We just yeah, just did strings for simplicity, and this is the get backlinks query.
Blue dot micro cross.links.get backlinks. This derives XRPC request, and this basically generates all the code that drives everything else. And so when you and so how Jacard works is as we go in here. Okay, yeah, this is um does it have does this function have the call in it? Uh yes it does. Um yeah, so this is a get profile call. This is going hitting the Bluesky app view. Um, and you basically just send it. This is this uh implement this uh on the A2P client. Yeah. And you just send it and you await, and then you match on the response, you match into output.
This gives you this gives you a nice owned easy to work with version. There's also parse that borrows from the buffer. And then yeah, and so if you get a success, or you get the defined XRPC errors also again from the lexicon. And yeah, this is doing a lot of handling of that. And then yeah, this is the request enrichment. This is where we're hitting slingshot. Um again, like Jacard actually has a built-in slingshot helper that just hits it, which I need to change to use the blue dot microcosm. It still uses comm.pat example uh but yeah, and so yeah, again, fetch fetch fetch record slingshot.
Um and Jacard also has fetch record or get record that gives you a specific collection type. If you want a profile, it will give you the generated profile struct. Yeah. And yeah, this is for arbitrary data, which is why it's hitting that. And again, yeah, you can kinda and uh here's constellation, yeah. And so you have the constellation base URL, and then construct the query, XRPC, send it. Yeah. Incredible, thank you. Sorry, yeah. It's like this is that's kind of yeah, it's like that's kind of how it works. That's how you use it. You don't and the the whole goal is that you don't need to do a whole lot beyond.
Awesome. We have time for maybe one or two more questions if there's any more in the audience. Yeah.
Yeah, uh, could you speak again on what the um did you say that you did make refactor to the the lifetime challenges or you have intended ideas? Oh, um so uh there yes I have. Uh no, I've got is it good? Yeah, okay. Um so yeah, uh up on Tangled, there is a beta branch. Uh uh Boss uh B O S beta. And that I did this over last weekend. Uh not this one, the yeah. Good lord, not this one. Uh yeah, no, over the previous weekend I did uh refactor away. And that's why you're not seeing a whole bunch of lifetimes in here.
This is the this is the beta of that. And so yeah, I didn't want to go straight to like pushing that to main because there are still some things that is broken on it. Um in particular the lexicon, there's a there's a yeah, it's like there's a lexicon derived macro that still needs a bunch of fixing. But and I'm sure there are a bunch of other bugs. I found a couple when I was building this. So yeah, that and yeah, it's like that makes a lot of things much more possible, especially around interprocess communication. Um, for example, uh the Deoxys library has a does not it requires you to have this the deserialize owned constraint, which Jacquard previously cannot support and now can.
So yeah. Um yeah. If people want to try out the beta, it's there. If I can I can maybe cargo publish it as like a beta version if that's better for people, but yeah. Awesome. Thank you so much, Aruel. Thank you. This was very inspiring. Oh