Patrik Stas: Well, hello to
Patrik Stas: another. Every Vcx call it's 2,000 to 9, 3 s February.
Patrik Stas: and we have a book done on call. My colleague from Upset
Patrik Stas: this week calls, Can we? Probably fairly short, as there's not much things to cover. Not many
Patrik Stas: news coming up since the previous call. So
Patrik Stas: let me just get right into it.
Patrik Stas: I guess we can just skip over the first step. This for the recent work done. Point is there haven't been any
Patrik Stas: Pr. Is merged since the last week, and then moving on to the work in progress. We have a
2 significant items going on right now.
Patrik Stas: One is from George on a new labs working on the prototype, for
Patrik Stas: you need Ffi is a new approach for the
Patrik Stas: the exposing fi api's
Patrik Stas: from Aries on top of Aries Vcx. Charges, and being available to
Patrik Stas: to join us. This meeting, which is fine so, and this is still in progress, so
Patrik Stas: we will. We'll finish that off whenever that's ready.
Patrik Stas: and then moving on to the State pattern refactoring which we covered extensively. Last week
there has been more discussions going on
Patrik Stas: which are definitely worth going through and reading them.
Patrik Stas: Thanks a lot to to George for for a valuable comments, and sharing his opinion on this as well.
Patrik Stas: But I think at this point we are settled basically that this is something we want to go forward with. And yeah, bogged down, working
Patrik Stas: throughout the past week, completing this.
Patrik Stas: just running to some minor hiccups at the moment. But I think nothing which can be
Patrik Stas: figured out. But then maybe you want to share the small update on the on the story, on the on the Pr.
Patrik Stas: I think. Well, you're not muted, but I can't hear you
Patrik Stas: still done here anyways, even though I see that you unmuted your cell
Patrik Stas: and
Patrik Stas: and booked on and dropped off. I think he run into some
Patrik Stas: technically shoes there. So let's let's see if he
Patrik Stas: comes back, and
Patrik Stas: if we can get some sort of update from him.
Patrik Stas: Yeah, I see that you reconnected and
Patrik Stas: rejoins.
Patrik Stas: I don't know if this by any things issue on my computer. But I
Bogdan Mircea: Okay, yeah, My: My.
Bogdan Mircea: yeah. So
Bogdan Mircea: essentially, this is almost done right now. The at least the implementation part is done. We're just going through this right now, just to make sure that everything stays.
Bogdan Mircea: Everything keeps working.
Bogdan Mircea: Yeah and overall it shouldn't be too difficult for people to transition to this
Bogdan Mircea: I mean stuff like it. By and previously working things
Bogdan Mircea: will
Bogdan Mircea: will remain working. So I went into Lebesiax and the
Bogdan Mircea: example, age and implementation, and that we have to modify it accordingly.
Bogdan Mircea: and basically use the type state pattern connection instead.
Bogdan Mircea: The the big difference about this is that right now, you would essentially so in these 2 examples, just to keep things nice and easy and simple.
Bogdan Mircea: because you have different types for different states of the connection
Bogdan Mircea: we
Bogdan Mircea: expose this generic connection type which can
Bogdan Mircea: it might fold any State. But you cannot progress the throughout the Protocol. With that you have to convert to a certain.
Bogdan Mircea: a certain state.
Bogdan Mircea: and then take it from there.
Bogdan Mircea: And now that's not necessarily a problem, because at certain steps of protocol you know exactly what state you must be in like we discussed last week. If you get a connection request you would at least expect maybe not.
Bogdan Mircea: You don't know for sure what connection you're going to have. But you expect that the connection should be in a requested state. So if that conversion fails.
Bogdan Mircea: then there's this little.
Bogdan Mircea: You were trying to basically do an an invalid operation.
Bogdan Mircea: But it it's not going to go any further from there.
Bogdan Mircea: Yeah. And then this also allows you. It exposes a thin state
Bogdan Mircea: type which you can just match on to. I don't know if you do serialize connections from a database, let's say, and you want to store them individually, you can. You could have a hash map for actually each type of these connections like each
Bogdan Mircea: state
Bogdan Mircea: you can. You can do that
Bogdan Mircea: as well, because you can determine it at the time
Bogdan Mircea: based on that. Then state what other state you're expecting to get out of the genetic.
Bogdan Mircea: So, yeah, essentially, it's just a matter of converting back and forth, back and forth
Bogdan Mircea: to that generic connection type. If you want to go that way, that route
Bogdan Mircea: which makes it. Let's say more backwards compatible. We're more
Bogdan Mircea: friendly to users that we're using the the previous implementation.
Bogdan Mircea: But, like, I said, you can also go ahead and just store each individual type of a connection, or you can have a mix of both saying that you want to store the complete connections in one place
Bogdan Mircea: and the the rest of the connections, regardless of this thing. You want to store them separately.
Bogdan Mircea: You can pretty much go any any way you want.
Bogdan Mircea: And yeah, essentially, the benefits are likely to last last week, just enforcing the protocol of compile time, and also having access to the State and and its inner things
Bogdan Mircea: in a more
Bogdan Mircea: a deterministic.
Bogdan Mircea: because you're expecting strict and stuff to be a certain.
Bogdan Mircea: That's that's pretty much it
Patrik Stas: right? Right? And yeah, at this point, I see. Basically
Patrik Stas: I guess it's Also, this is already a replacing the old connection code with the new code, right? Because I see, yeah, yeah, I did remove the old.
Bogdan Mircea: replaced the
Bogdan Mircea: like. Its usage and the
Bogdan Mircea: in in the
Bogdan Mircea: with the new connection type.
Bogdan Mircea: And yeah, that's why you see the the deletions there.
Patrik Stas: Hmm.
Patrik Stas: And
Patrik Stas: right. So basically, yeah, this is, I guess, important to know, for anybody listening to this are interested. Is that basically this
Patrik Stas: doesn't
Patrik Stas: like.
Patrik Stas: since since we are making changes on the non-negative connection which is being added recently.
Patrik Stas: there's not really impact, probably, for anyone as this has been just other recently, and we are making a sense like breaking change on the the non mediated connection serialization, format. But assuming that this hasn't been yet adopted in like past.
Patrik Stas: What was it 2 weeks since we added it? They shouldn't have any like material impact for anyone.
Patrik Stas: And basically, we yeah, basically, we are kind of starting from it's. It's really like Nice that we happen to do this.
Patrik Stas: this huge sort of refactor
Patrik Stas: new approach just now just after we added the new non-mated connections. State machine, as we can, starts create from scratch in terms of the serialization format which hasn't been like the previous one previously. I was saw lots of like nesting, and
Patrik Stas: we just
Patrik Stas: sort of awkward to work with 1 1 1
Patrik Stas: when when you look at the Jason. But here we are, starting kind of from scratch. I just wonder now at the spot, if there is by any chance like any sort of serialization, the serialization test, which, if I look at, I would see the actual current
Patrik Stas: serialization.
Bogdan Mircea: There's not any just yet.
Patrik Stas: Okay.
Bogdan Mircea: Yeah, that's that's also on the list, basically
Bogdan Mircea: the the serialization. And this realization pretty much
Bogdan Mircea: fairly straightforward. The only reason I I would really like to go through some.
Bogdan Mircea: you know, having some actual tests for it, just because
Bogdan Mircea: to basically
Bogdan Mircea: it'll keep everything in check. And to basically facilitate the visualization of serialization. There are different types implemented for each of those processes. So the deserialization happens by. If you have a certain connection.
concrete, state
Bogdan Mircea: you, it's for it first gets converted to a generic connection, and then that that's what actually gets.
Bogdan Mircea: Actually. Yeah, that's what actually gets the serialized. Or rather, you start from a string. You turn it into a better. And then you
Patrik Stas: sorry. Maybe this is actually, you know, this is like interesting kind of part of the code.
Patrik Stas: Interesting work you've done there. So and i'm not like having a chance to like. Take a look in a detail, so maybe we can actually take this to support kind of opportunity, and we can just a guy me through it, you know as a person who is not so yet familiar with the actual
Patrik Stas: code
Patrik Stas: in terms of the serialization.
Patrik Stas: So I guess, like, yeah, you started with the we have like. So we have the specific, like concrete types, right? So that I can. I can take a look at, I guess.
Patrik Stas: Oh, this is handlers right? Right? Yes, protocols. And yeah, let's take, for example.
Bogdan Mircea: the generic one.
Bogdan Mircea: So yeah. But these are just the the States. So what you might want to look at. These are States right. These are States common states. You might want to have a look at the models in generic. That's where the connection is, for there's a short description there about what it really is about, and
Bogdan Mircea: like what what purpose it serves
Bogdan Mircea: so essentially like we like. We discussed the Protocol is enforced now from file time through different states, through rust type system.
Bogdan Mircea: But there are often a lot of times where you want to just store everything together or have a common way to represent the connection. And that's what a generic connection is for
Bogdan Mircea: now, because this again
Patrik Stas: the jury connection that's that's sort of by looking at it. It's sort of like the
Patrik Stas: old handler, right because
Patrik Stas: it doesn't
Patrik Stas: it doesn't Yes, or the the state sort of it can. I can go through it. Id while being unaware in what state we are. Exactly. Right. Yeah, yeah, it has. It has certain methods that my account can be so that you, Don't, necessarily have to know the
Bogdan Mircea: exact state of the connection.
mostly like
Bogdan Mircea: That's not necessarily the main reason I implemented.
Bogdan Mircea: This was was mainly for this realization, but through the use of
Bogdan Mircea: where it's using the Ffi and all that stuff, I figure that this might actually come in handy.
Bogdan Mircea: So
Bogdan Mircea: So yeah, this can represent any connection, but you cannot use it to actually advance throughout the protocol.
Bogdan Mircea: So
Bogdan Mircea: essentially you convert their implementations from
Bogdan Mircea: a generic connection into a concrete state
Bogdan Mircea: which will succeed if the genetic connection is in the right state or fail if it's not.
Patrik Stas: and so in front of implementations. This this conversion. When when you convert generic connection to concrete state.
Patrik Stas: where can I sort of find that
Bogdan Mircea: you can have a look in conversions
Bogdan Mircea: just a file about, and there's no engineering module. Yeah, You know what I'm: I'm going to actually open this up in My, Id i'll be there. I'll stop sharing for a moment
Patrik Stas: and
Patrik Stas: check out your branch
Right?
Patrik Stas: Am I sharing my screen?
Patrik Stas: Yeah. Yeah. Good. All right.
Patrik Stas: Yeah.
Okay.
Patrik Stas: So is the Cx. And we can have a look.
it's!
Patrik Stas: Oh, and that's that's that's not what we are looking for
Patrik Stas: connection. And there we go. So generic that's what we've seen. The generic connection and the conversions you are frame. Yeah, there are some.
Bogdan Mircea: There are some Macros here to basically these things up, because it's a lot of boy locally.
Bogdan Mircea: But essentially it's just it's from a concrete connection.
Bogdan Mircea: You can definitely convert that into a generic connection, because a generic connection can hold in a state.
Bogdan Mircea: So they are from implementations for that. And then the the other way around from a generic connection to a certain state. There are tried from implementations.
Patrik Stas: Right? Right? And you had to like basically implement these like for each of the
Patrik Stas: yeah, each of the in creates time, right?
Patrik Stas: Right? And then do you have it in like in pair, so that will be like the from concrete to that.
Patrik Stas: So when you here you write 2 bags that actually probably refers to the.
Bogdan Mircea: to the
Bogdan Mircea: I'm going to go ahead and
Bogdan Mircea: yeah modify that. Yeah, Initially, I named it vague connection, but that was kind of weird. So I thought that maybe generic connection would be a better name.
Bogdan Mircea: So yeah, that's essentially what's what's happening. And the entire machinery just works through these things. Now, the actual implementation is really referred to like. First, the State is converted
Bogdan Mircea: from a complete state or generic state, and then there are some trade bounds and stuff like that.
Bogdan Mircea: But essentially, yeah. So when you, when you want to deserialize a string into a country type, you can just write that directly, like, be serialized
Bogdan Mircea: and provide the the concrete type.
Bogdan Mircea: and it's going to try to do that.
Bogdan Mircea: And so I I I guess we can have a look at it in the Vcx. I suppose. There. Yeah, I actually wanted to suggest that, too.
Bogdan Mircea: Yeah. So if you go there on their handle and connection.
Bogdan Mircea: these are for other stuff. You want to look at the bottom of the file to the 2 string and from string.
Oh, yeah, there we go.
Bogdan Mircea: right. So
Bogdan Mircea: when you, when it see, realizes it now the the connections here are stored as generics as generic connections. So it's not that big of a deal.
Bogdan Mircea: but essentially, if you had a concrete type.
Bogdan Mircea: you can see, realize that as well, just fine.
Bogdan Mircea: And the serialization would happen through a different type which is not exposed to users. But it's basically a mirror of the generic connection just that it takes references. And the reason for that is because this way
Bogdan Mircea: serializing something takes a reference to the type. So
Bogdan Mircea: we convert this reference to a concrete connection into
Bogdan Mircea: that particular type
Bogdan Mircea: for people. They want to look throughout the code. It's a serializable connection or something like that.
and it's essentially just a mirror of this. But it takes references.
Bogdan Mircea: Yeah. So that we don't clone stuff around, and then this gets serialized, and it shouldn't match the
Bogdan Mircea: the generic connection.
Patrik Stas: and then at least realize. So let me have a look where, how and where is this kind of used? So this is this is the file itself, and apparently to call from what Rs.
Bogdan Mircea: That would be the generic. These are these are these are some. This is only in the in the test. So these are some from implementations. For when we run tests, basically
Bogdan Mircea: some compile time checks that the the States where the State that the types are
Bogdan Mircea: sort of identical in terms of fields and types.
Bogdan Mircea: Because if you scroll a bit out, you're going to see that this is in in a test module. Oh, yeah, right?
Bogdan Mircea: So this is only going to compile it when you're running test.
Bogdan Mircea: Yeah. But I think that right a bit right
Bogdan Mircea: just above that. Actually, we're still in generic in the serial. But serializable file.
Bogdan Mircea: Yeah. So I think at the bottom of the file there's a serialized implementation
Bogdan Mircea: for connection.
Bogdan Mircea: Yes.
Bogdan Mircea: So that's
Bogdan Mircea: basically instead of deriving serialized for connection.
Bogdan Mircea: we just implemented manually here by first converting
Bogdan Mircea: the
Bogdan Mircea: self-reference
Bogdan Mircea: into a serializable connection and then serialize that instead
Bogdan Mircea: an easier way. We're
Bogdan Mircea: yeah. A simpler way to achieve this would have been to just
Bogdan Mircea: convert the the
Bogdan Mircea: the the concrete connection to a generic connection, and then serialize that. But the difference is that
Bogdan Mircea: since serialize takes a reference, you would have to clone the reference to get the known to type, and then convert the type to the generic connection.
Bogdan Mircea: So this is more efficient because we no longer have the phone like that.
Bogdan Mircea: and that's in terms of serialization. So serialized sterilization can happen like this from a concrete type, and can obviously happen from the generic connection as well. That's just through.
Bogdan Mircea: Just to certainly certainly derive
Bogdan Mircea: a micro
Bogdan Mircea: the visualization
Bogdan Mircea: well like for a generic connection again, it's just so. They derive. So that's fairly fairly straightforward.
Bogdan Mircea: But when you want to visualize through a complete type. If you
Bogdan Mircea: expect a certain type like, let's say you never store your connection strings in memory, you just retrieve them from the database, and you expect a certain type of a certain point.
Bogdan Mircea: Let me receive a request.
Bogdan Mircea: So you retrieve the string from the database, and you want to disrealize to a connection, invite or request it, or something like that. You can directly do that, because again, through certainty, some certainty attributes
Bogdan Mircea: it will basically first be serialized into a generic connection.
Bogdan Mircea: and then convert through the try from implementation
Bogdan Mircea: the generic connection into the concrete.
Bogdan Mircea: Oh, sorry!
Bogdan Mircea: So that can happen directly.
Bogdan Mircea: or if you're unaware of the type that you expect, you can just deserialize to a generic connection
Bogdan Mircea: and match on the State and
Bogdan Mircea: handle that. However, you want
Patrik Stas: right?
Patrik Stas: Yeah. So in this case, for example, here we are, just this realizing apparently to
Patrik Stas: you do a generic connection, and that's even stored in the the memory
Bogdan Mircea: right
Bogdan Mircea: and
Bogdan Mircea: exactly, and in the other exposed functions, like when you're processing request.
Patrik Stas: I don't know if you can scroll up a bit. So process response, For example.
Bogdan Mircea: Yeah, sure, that works any of them doesn't really matter. So, as you see, we basically get a connection, we call them connection from from cash.
Bogdan Mircea: We just get the wallet. And then
Bogdan Mircea: this realized that proposed to get the request type
Patrik Stas: in in here we are the world connection. So this would be.
Patrik Stas: this will be yeah, right? So this is specific type, and it's being converted, generate connection we store but here, which is correctly a returned it sort of typed connection, right
Bogdan Mircea: right? And it's all done through type and Ferris, because
Bogdan Mircea: later down the line we call, let con and say con handle request. So that method is only available to a specific type
Bogdan Mircea: yeah of like a certain connection state.
Bogdan Mircea: So through interference it knows that if you pull this
Bogdan Mircea: method, then you will have that type, so it knows that get close connection, will expect that type
Bogdan Mircea: which is connection. Invite her invited
Bogdan Mircea: that. So
Bogdan Mircea: that's pretty much it. And then
Bogdan Mircea: inserting it back. Here
Bogdan Mircea: happens transparently, and then the connection gets converted in that
Bogdan Mircea: insert connection function.
Bogdan Mircea: But, for instance, in E add connection function, we convert
Bogdan Mircea: directly, like before insertion. If you scroll up a bit.
Bogdan Mircea: let's see an example of that.
Bogdan Mircea: maybe in the constructors the invitation. Now.
Bogdan Mircea: these are generic
Bogdan Mircea: functions.
Bogdan Mircea: Yeah. So
Bogdan Mircea: here and create, invite T. When we add a connection, the difference being that here we don't have a candle, we generate one. Instead.
we first
Bogdan Mircea: call into on the connection. So we say Con into so we can convert the con on the last line of AD.
Bogdan Mircea: Right? Yeah. So we call Con that into. So we convert the concrete state to concrete that to the generic connection, which is what and function.
Since.
Patrik Stas: Hmm, right? Right?
Patrik Stas: Yeah, it it looks
Patrik Stas: like it definitely is, is more complex, and I think this is the opportunity for people to like, learn, and for myself as well from these.
Patrik Stas: But in after all, it looks pretty nice, and so it's
Patrik Stas: the the Api is pretty user friendly, if not friend, probably friendlier than before.
Patrik Stas: So yeah, it's it's pretty cool. And
Bogdan Mircea: yeah there, Aren't: that many different parts.
Bogdan Mircea: Yeah, apart from just handling this like this State this this type thing, and converting back and forth.
Bogdan Mircea: It's not that different? But this is only because we store the connections in that generic
Bogdan Mircea: type, the generic connection type. There's nothing really preventing you from having
Bogdan Mircea: like they're they're a
Bogdan Mircea: I believe, in total 10 different states they could possibly have. So there are 5 each, and then you are either an inviter or an invite. So that's the rule of 10.
Bogdan Mircea: Yeah, You could literally have 10 hash maps for each State, and maybe a set to just
Bogdan Mircea: make sure you don't have a conflicting ids
Bogdan Mircea: or handles and just storage state, and it's like each connection type in its own individual map. Then we can look them up like that. So that would
Bogdan Mircea: even
Bogdan Mircea: make it not like that would make you not even have to worry about this conversion and taking
Bogdan Mircea: a generic electron and what not.
Bogdan Mircea: maybe only when we did serialize and stuff like that, but
Bogdan Mircea: then you would match on the State and put the connection in its proper cache. Now
let's see.
Bogdan Mircea: But just for the for the purpose of
Bogdan Mircea: F. And not changing this too much.
Bogdan Mircea: I I just said it would be easier to to work with it like that. But again, there's nothing prevent you from going a bit.
Bogdan Mircea: But the
Bogdan Mircea: you know being a bit extra going the external
Patrik Stas: right? Yeah, I I agree. I I think it's a good approach taken, and yeah, going like forward, I I guess, from from what I know you, you run into some like testing issues with no jazz. But but I think that wouldn't be something significant. I mean, it seems like it's just some sort of implement
Patrik Stas: with the new codes.
Patrik Stas: But
Bogdan Mircea: yeah, it's probably just because of my understanding of the environment. I guess i'm digging through it trying to figure out what's the issue.
Bogdan Mircea: But yeah, I don't think it doesn't seem like it's too big of a deal. It seems like one of these really, really small things that you just.
Bogdan Mircea: I don't.
Bogdan Mircea: You just don't don't see?
Patrik Stas: Yeah, yeah. And there's been going forward.
Patrik Stas: Maybe we can. Actually, you you are mentioning before some of the work you like to
get into before you start, like applying to the
Patrik Stas: the approach you've taken with connection to the other State machines we have. But there's something something else you would like to dig into right, so maybe we can. I can like actually put into
Patrik Stas: the main mentioned in the meeting nodes.
Patrik Stas: So
Patrik Stas: yeah, maybe you can just briefly describe those those items you would like to enhance.
Bogdan Mircea: So I guess the the next thing like by while working on this, I I saw that there.
Bogdan Mircea: There is a lot of cloning going around, and a lot of
Bogdan Mircea: I mean. The compiler probably optimizes some things
Bogdan Mircea: as well, but
Bogdan Mircea: I think we can. We can push things a bit
Bogdan Mircea: a bit more by taking
Bogdan Mircea: making use of references more in terms of messages, and
Bogdan Mircea: I know exposed fields and stuff like that. So essentially my
Bogdan Mircea: like my idea going forward after this is all done and merged to be to go through the messages. And maybe the bit thought grade 2,
Bogdan Mircea: basically
Bogdan Mircea: We factor it a bit, not structurally, but rather
Bogdan Mircea: to try and expose as many references as possible
Bogdan Mircea: in the in the idea of
Bogdan Mircea: like right. Now, these a lot of these
Bogdan Mircea: methods that are exposed
Bogdan Mircea: just clone inherently clone
Bogdan Mircea: or implicitly quote.
Bogdan Mircea: and that's not necessarily a a good idea or even a good design, simply because in R you can get away with references, and especially when you
Bogdan Mircea: one a sense stuff like when you, when you just want to send stuff down the wire or put it in the file or stuff like that. You can print it to standard output.
Bogdan Mircea: You can get away with just read access of the data. So you don't necessarily need it. Don't type.
Bogdan Mircea: And
Bogdan Mircea: yeah, essentially.
Bogdan Mircea: even in in scenarios where, let's say, I know someone that uses just the message is great, would need some own string, and we just expose a
Bogdan Mircea: a string slice.
Bogdan Mircea: They can clone it themselves
Bogdan Mircea: because they might need that in. I don't know 3 out of 10 cases, but in the other 7 they can get away with a reference, and
Bogdan Mircea: it's going to be much, much better if we just expose that.
Bogdan Mircea: so that we don't. We limit all these clonings and the memory footprint.
Bogdan Mircea: And yeah, that's that's pretty much the plan just trying to expose this.
Bogdan Mircea: you know, in a in a more memory-friendly. But
Bogdan Mircea: and I've also seen that there are some macros implemented for some common behavior
Bogdan Mircea: which are really nice. But I think we could also get away with some trades implemented for that.
Bogdan Mircea: and the reason for that is that now I didn't go through all of them, and in that much that. But, for instance, there's this macro where there are 2 of them like thread-like optional and thread-like.
Bogdan Mircea: which implements some
Bogdan Mircea: expose some, some things from an inner thread, from a message or request in response to stuff like that
Bogdan Mircea: which essentially have a thread field like a thread to type.
Bogdan Mircea: And
Bogdan Mircea: besides the fact that all of these flown, and we probably can get away with not doing that.
Bogdan Mircea: there is also the
Bogdan Mircea: the idea of implementing a trait which we can
Bogdan Mircea: we could use in a more
Bogdan Mircea: ergonomic fashion, so we could have some default methods on the trait
Bogdan Mircea: that just process a thread
Bogdan Mircea: I don't know just They get the thread object, and they they return some field of the thread or a thread by from some they tend to feel good.
Bogdan Mircea: and then the non default methods on the trade. So things that you would implement when you implement a trade on on a certain type
would just be
Bogdan Mircea: getting the the the thread run for us.
Bogdan Mircea: and this would essentially make
Bogdan Mircea: it would end up. Being a some, a bit of a less code
Bogdan Mircea: would be some less code, because
Bogdan Mircea: we would have only to implement these access or methods
Bogdan Mircea: from the trade and the rest. But just work by itself.
Bogdan Mircea: It's it's pretty much like if you see if you're familiar with the iterate their trade and in rust
Bogdan Mircea: to to make something to make a type and iterator. You only have to implement the next method. And then, once you do that, there, there's this
Bogdan Mircea: long list of things that you can do with the trait, because they all work based on that access or
Bogdan Mircea: not. Sure, if that's the proper term. But
Bogdan Mircea: yeah, based on that, on that method that you.
Bogdan Mircea: You have to implement.
Bogdan Mircea: Now, nothing is preventing you from overriding different things if you really want to.
Bogdan Mircea: But
Bogdan Mircea: if you can just use the default behavior, and I guess that most of the time you do.
Bogdan Mircea: You just implement that and get away with it.
Bogdan Mircea: and you have an iterator.
Bogdan Mircea: So yeah, it's it's again.
Bogdan Mircea: I mean, there's also like
Bogdan Mircea: I'm not sure if this would be used or not. They're also stuff like having a common phrase. I mean you could even do some trade bounds.
Bogdan Mircea: We're trade objects again, not sure if this would be
Bogdan Mircea: necessarily helpful.
Bogdan Mircea: But the the overall idea is simply having the
Bogdan Mircea: yeah, the common behavior defined as a trait
and
Bogdan Mircea: taking some of that.
Patrik Stas: And I guess so like this. This.
Patrik Stas: The these 2 items you mentioned is a reducing cloning replacement of the macros. That's something you as I understand that something you run into in
Patrik Stas: throughout the working you found. This is like a need for like, for the improvement of the pattern itself. Right so now, after we do these 2 items, then we can move on to applying the the, the, the
Patrik Stas: the state pattern for the other State machines we have.
Bogdan Mircea: Yeah. So essentially, I think that
Bogdan Mircea: after after the the messages into the top rates are
Bogdan Mircea: it cleared out a bit.
basically
Bogdan Mircea: we're going to go through the connection again just to see what take advantage of the enhancements we have that we did.
Bogdan Mircea: And then yeah, basically move to to other State machines.
Bogdan Mircea: And, as I said, the the whole point of this would be that.
Bogdan Mircea: for instance, in the connection, I basically
Bogdan Mircea: did some work around to take advantage of some references sometimes when I could.
Bogdan Mircea: and it's not necessarily a good idea, because if I, if I were to move to other State machines. Now, then, I probably end up doing the same thing.
Bogdan Mircea: and it would be better to just.
Bogdan Mircea: you know.
Patrik Stas: treat the like 3. The illness, not the symptoms. Let's say, yeah, like, do the first thing like all the way. And then you can read the same pattern properly on everywhere else. Right?
Bogdan Mircea: Yeah, but it's not necessarily about the pattern itself. It's more about just the the overall usage of of memory.
Bogdan Mircea: And
Bogdan Mircea: like this. This would have
Bogdan Mircea: being a good idea, even if we didn't implement the state pattern.
Bogdan Mircea: the type, the type thing. Yeah, I mean, like pattern like, not necessarily. I didn't refer to the the State pattern itself, just like
Patrik Stas: like the overall. You know, the whatever the new pattern, the new sort of refactor version of that State machine is like we. We can do it, you know, proper properly with with, without any sort of workarounds which we can
Patrik Stas: get rid of you by by doing this further enhancements.
Patrik Stas: and then we don't have to like worry down the road. How we have to like further
Patrik Stas: refact right across the base or something
Bogdan Mircea: right? And and essentially the idea is that all these, like changing the the
Bogdan Mircea: the the design, use, or the pattern used in these State machines, kind of implies
Bogdan Mircea: somewhat of a refactor.
Bogdan Mircea: simply because
Bogdan Mircea: some things change like I said so. For instance, if you.
Bogdan Mircea: if you're expecting like in the previous implementation, you would want to get a a dead dog, for instance, but you don't know for sure whether the State
Bogdan Mircea: and the type would represent would be capable of representing all the States.
Bogdan Mircea: You wouldn't know for sure whether you have a dead dog in there or not.
Bogdan Mircea: and it's similar to what you get on the general connection. You get an option with the top reference, because we cannot not you. There is a a deduct in the State.
Bogdan Mircea: but when you work on a concrete state.
Bogdan Mircea: you know
Bogdan Mircea: whether you have a dead dog or not.
Bogdan Mircea: So some the methods. The method for getting a dead doc is only exposed for states that actually do have a digital.
Bogdan Mircea: and this makes some things much easier, because if previously, you would have to get the the dog, and it will get an option or a result, and they would have to
Bogdan Mircea: handle the air somehow or the not.
Bogdan Mircea: Now you don't, because if you can call
Bogdan Mircea: the the the method, you know you have a good job there.
Bogdan Mircea: and that's that's pretty much the
Bogdan Mircea: the idea. So it kind of implies some some sort of refactoring here and there.
Bogdan Mircea: and makes some things much easier. Simple because you don't have to deal with all these errors.
Bogdan Mircea: So yeah, having to do this.
Bogdan Mircea: then
Bogdan Mircea: I noticed all these optimizations that we can make in terms of
Bogdan Mircea: passing fields around and getting data.
Bogdan Mircea: And and yeah, I guess it would be a good opportunity to, as I said, Just go and work on that first, so that then we can propagate it much easier
Bogdan Mircea: to the other. The effort levels, and where these crates are being used in their into these here
Patrik Stas: right right?
Patrik Stas: All right, I guess. Like this is sufficient sort of already. Load like a pre projected load for what's what you would like to get done. I think this is gonna take some time, so
Patrik Stas: discover having send that to covering all this. Is there anything else you would like to mention, because before we.
Patrik Stas: before we wrap up our meeting.
Bogdan Mircea: No, I guess I guess that would be it
Bogdan Mircea: for for anybody tuning it later. Or
Bogdan Mircea: yeah, just just listening to to the recording this one or the the previous meeting the previous week's One.
Bogdan Mircea: Yeah, feel free to maybe leave some comments or notes on the issue, or the Pr. If it's not merged by then.
Bogdan Mircea: And if you see some some improvement ideas, I guess
Bogdan Mircea: we are more than open.
Right?
Patrik Stas: Yeah. Awesome, awesome. Thank you so much. We're done for New Year. And and having doing this, this guy drew on the call. So yeah.
Patrik Stas: I think we good good here, and i'll and i'll I'll see you. And here you talk to a next week.
Patrik Stas: Truth.
Bogdan Mircea: Yep, take care, bye.