Manic-depressive

I’ve been in a bit of a funk the last couple days. Not sure why. I guess I’ve acclimated to my new success and just in a bit of a down moon. Last week I was fairly manic and full of ideas, now it’s like a grey cloud has settled over and all my ideas are shit.

The kids have been singing We Don’t Talk About Bruno from Encanto. LMM sure does know his songwriting, doesn’t he? They were dancing around the kitchen last night after dinner, it was super cute. But when it was time to put the girls to bed last night, Elder wanted to stay up and write the lyrics out for some of her friends. I swear I had to argue with her for five minutes before I finally got her off the computer and to her room. She was trying to negotiate with me, that she would do what I asked if I printed her the lyrics. I refused to agree. I told her that she had had all day to do that, but that she had had other priorities and now it was quiet time and she needed to go do her room.

I haven’t seen Encanto yet, so I spent some time pulling up sheet music and looking over it. I printed her up a copy of the lyrics and went to check on her twenty minutes later to tuck her in and turn off her light. She had her notebook out and was handwriting the lyrics. She had written out two whole pages of lyrics, and I was pretty impressed, it seemed like she had gotten 75% of the way through it and had gotten it completely right.

It must have been after nine. I tucked Elder in, then went to my bedroom to talk to Missus and I turned around and Elder was standing in my doorway. She had something to say, but I was livid that she had gotten out of bed, and grabbed her by the arm to put her back in bed.

I woke up this morning — Younger slept in her bed, thank gawd — and Elder was already up on her computer writing out lyrics longform again. Since she was up, I told her, she needed to get ready so that I could take her in when I left with her sister. I was tired of having to take Younger, come back to the house and wait ten minutes, leave with Elder, come back and get on with my day.

She kept arguing with me that she needed to get this done. I started helping her and she started criticizing what I was doing, or how I was doing it. I was DONE. I told her to get ready and that we were done. It went downhill from there. Each time I asked her to do something she responded with complaint, or negotiation, or anything other than compliance. I started to lose my shit. It devolved into a full-on argument with me threatening to beat her ass if she didn’t follow directions and get ready to go.

Then Missus got involved.

I had already printed out several copies of the lyrics for her and put it in her school bag, but I wasn’t about to tell her that I had done it until she had done what I asked. It didn’t go well. Missus had bought her some new winter socks, and while she was putting them on she started complaining that they were too itchy.

I swore, got any more complaints?

Things had calmed down by the time I dropped her off, save a short crying spell when I told her she needed to learn to follow my fucking directions. Yay me, dropping f-bombs at my kid again.

I got home, meditated, did a couple of sets with the weights, and here I am. Time to pull myself together and focus. I just don’t know what I’m doing.

Solana as entity component system engine

I don’t want to get too tied up in the usual diary-journaling and talk about how horrible I slept last night, instead I actually have the beginnings of a longer-form post about Solana and data-oriented programming. I’m not sure how much I can say quite yet as I’m just breaking the surface of things and am just forming my ideas.

The old joke about blockchains as really slow databases is funny because it’s true. Solana, however has always been focused on providing enterprise-level performance to the network. It’s got a long ways to go, from a stability and performance standpoint, but I think the core team and the community are doing a great job so far.

I’ve never been a programmer, per se, the best I can say for myself is that I’ve known enough about various programming languages over the years to be dangerous. My demonstrative knowledge is limited to various procedural scripts and smaller OOP type of programs written in Python, JS, bash, or dare I say, Powershell.

One of the benefits of being on the Star Atlas team, my first at an actual software/game development company, is that I’m surrounded by a ton of really smart people, and our tech leads are really solid. I recently asked them if they considered what we were doing as OOP, or if there was some other term that they would use to describe what we were doing. The phrase data-oriented design was bandied about by a couple people, and that sent me down my current path or research.

I’m currently reading Richard Fabian’s Data-Oriented Design book online, and while I’m only a couple chapters in right now I have also been reading up on various Entity Component System, which are basically data-oriented systems, somewhat popular in game development. If you want a primer on OOP vs. ECS, this 2018 RustConf keynote by Katherine West does a pretty good idea explaining it.

Basically, OOP ties together data and behavior into classes, whereas ECS keeps them separate. Entities are basically little more than an ID, and these are linked to various data-only structs. Behavior is kept entirely separate in systems, which simply perform read and write operations on various numbers of these components. The simplest example I’ve seen is a physics engine that calculates velocity. There are components for position, heading, and speed, and the velocity system iterates through every entity that has these three components, reads heading and speed of each one, then calculates the new positions based on how much time has elapsed.

The advantages of this data-oriented approach are numerous from a design and implementation standpoint, and there are also many performance benefits that allow pipelining and tend to reduce cache misses. Since these systems are operating on homogenous data types, they can be packed together more efficiently and can be processed synchronously.

The parallels with Solana are numerous, and to me, it was not apparently obvious coming into this space why Solana’s programming paradigm felt so different and unusual. For the uninitiated, Solana programs are stateless, and operate on a number of behavior-less accounts, which contain state only. These accounts aren’t limited to holding just one data component, but usually hold all of the state data belonging to a user or other program.

Going back to the blockchain as database analogy, ECS systems operate using a query system, and Fabian spends a lot of time talking about data normalization and relational databases. Now, one interesting thing about Solana programs is that they have no knowledge or ability to find accounts elsewhere on the blockchain. In fact, all accounts needed to perform a computation, that is, all of the data, has to be passed in the program instruction from an offchain client. Basically, one must query or enumerate these accounts using an off-chain client via RPC calls to Solana validators. Then they can be bundled into various program instructions and sent as signed transactions to affect various state changes.

If one considers entities as primary keys in a database, then you might say that the primary keys in Solana are created from pubkeys, whether they belong to a user or another program. The analogy is a bit forced here, but one can combine user pubkey, program keys and a bump seed to generate unique account addresses. These addresses are deterministic, so it’s unnecessary to keep a registry of these addresses. The client simply rehashes the inputs and does a null check against the program derived account. My understanding is a bit weak here, as one can generate all of the accounts owned by a particular program, but this is relatively costly if you’re only dealing with one user.

I’m still fleshing out these ideas, but it’s obvious that Solana is a data-centric system, compared to the EVM in which data and behavior are more closely intertwined. Experienced Solana developers probably implicitly understand this, but for those coming from OOP and more traditional (e.g. university-taught) computer science backgrounds, this comparison between Solana and an ECS might need to be more explicitly stated.

For now, I will continue to explore, and learn, and do some experimentation around data storage, cross program calls, and RPC queries, to benchmark how well Solana holds up when programs are designed in strict single-field data accounts. Using an off-chain client to query and batch process large numbers of these components across user’s may allow us to develop a large-scale game engine that can support a large user base. Whether this is possible remains to be seen.

Unreal

The cold has really settled in, it was in the twenties this morning when I brought the kids to school. It’s going to hit mid-forties today, will probably melt off most of the snow that’s still on the lawn. I’ve been running the gas fireplace in the den pretty much non-stop for the past week or two, only turning it off during midday when the heat becomes a bit unbearable, or when we go to bed at night.

I got a quote for home repairs from my friend A., who is a bit of a real estate pro and has a contractor that he uses for his work. It’s about six grand altogether, to repair the storm and garage doors, and a bunch of interior and exterior painting. The biggest chunk of it is the crawlspace. We need insulation rehung, better moisture barrier and a dehumidifier installed. I’m about ready to pull the trigger but feel it might be a bit steep. I figure A. is taking his 10% or whatever, but I don’t really have a problem with that. I just don’t have a frame of reference for what these thing should cost. As far as my hourly rate goes, I suppose it’s not too bad.

Today is payday, so I’ll make the decision then. I’ve been trying to use YNAB, but it doesn’t really do a good job separating my concerns. I’ve got the house account in there with my personal ones, and I haven’t figured out how to keep things separate without a bunch of manual bullshit. And I need to add my LLC stuff in there as well.

I’ve got so much that needs doing, but I don’t have the energy for half of it. Taxes, and making sure I fund my IRA for 2021 is probably the biggest pain point, and I’m definitely procrastinating on that.

I just realized that I’m now paying more in taxes than I made at my last job. Crazy how life has changed.

Ice Skating

Had a pretty good night and a pretty good day today.

Last night we hosted the T.’s over for game night. We got the house cleaned up and I went crazy at the grocery store. Apparently they make their kids stay at the dinner table until they eat their dinner, and two of them fell asleep at the table, so S. came over with her eldest and we all played Uno and Munchkin. Then I stayed up till gawd knows what hour playing games with the LANarchists. Bought a new four-player co-op game called The Ascent.

Younger had told me that she wanted to go ice skating, so I made that happen today. We booked a group lesson, and so the four of us went along with the T.’s as well. It was fun. Thankfully I was able to get some lace-up boots, as the other ones are physically painful for me to wear. The girls had fun. Elder seemed to get the hang of it, Younger needed to hold on to me most of the time. Then we came home and vegged out. The girls are all ready for bed, and I’m going to pass out shortly thereafter.

It was a good day for the most part, although the kids were a bit mouthy. I think everyone needs sleep. I know I do.

Second snow

Thank gawd I got some sleep last night.

We got three inches of snow overnight. The girls played outside for a bit. I had to order Elder new gear because she didn’t have any decent boots or bibs. Younger wants to go ice skating, so I’m organizing a group trip with the T.’s to go to the local iceplex tomorrow. Tonight we’re going to have a brownie and board game party with them.

First we’ve got to do some cleaning up downstairs, and I want to do a bit of coding this afternoon on the auto-Fleet replenishment system. I’ve been ignoring it lately but my brain is rekt from trying to figure out this Machinations/ECS system that I need to take a break from it.

I started another set of plants. The first two that I planted I almost killed. Twenty-four hours off light apparently isn’t good for sprouts. I thought both were dead, but I see signs of growth. One of them is shooting up, no leaves yet, and the other appears to be turned upside down in the plug. I thought I saw signs of a vibrant green leaf under the stem which is curled up, not yet able to pop out of the plug. I might help it along. Still, I went ahead and started four more seeds in a bowl and moved them to a paper towel yesterday. We should be good, one way or the other.

I. Am. Tired.

Missus was feeling better today so she took over ‘parenting’, which basically meant letting the girls watch TV all day. I had several meetings and tried to do some coding. Turns out trying to design an ECS is hard.

It’s supposed to snow again tonight. I was considering going up to the FIL’s house so the girls can take ski lessons, but Missus isn’t terribly interested. Elder doesn’t want to ski at all, apparently she’s got some sort of PTSD from the last time I took her.

The kids found a stray cat outside, very young. They were worried about it being outside during the snow, but I said let it be. They took it to D.’s house instead. He came by for a bit.

The house is a wreck. No one wanted to clean today, so the kitchen is a huge mess. I could care less right now.

Evening notes

Today has been an interesting day. I managed to stick to a pretty good schedule, despite Missus being holed up in the bedroom with a case of the post-booster blues. I actually sat down with the girls this morning and wrote up a schedule of what I expected from them.

Let me back up a bit. I started writing up a new video game engine framework. I’m calling it A.L.A.N – autonoma linking atomic nodes. I actually spent a lot of time yesterday working on it, and when I went to bed I couldn’t stop thinking about it. I even woke up at five this morning running it over in my head.

It’s not much more than a cribbed framework run through an ECS framework, but I hope it might serve as a good basis point for this metaverse that we’re building.

I’m filling into the leadership role. Really filling into it. I got a lot done today.

I think I found a contractor yesterday, I might actually get some work done on this house.

I may have killed my plants. Thought for sure that I read seedlings needed 24h light but I guess I messed that up. Have turned off the lights. One of them may still survive. Started the next set of seeds.

Playing lots of games. It’s research.

I did work out this morning but it was not very productive. For me at least. I did two exercises, shoulder press and step ups. I had to show Younger how to do a deadlift. Tonight though I seem to be on the bender path. 2100 hours, gonna watch Ozark.

Figured it all out

I don’t feel like I’ve been doing much right lately. I don’t have the anxiety that I did earlier this week following my liquidations, but I had been feeling a bit aimless. I did finally find a bit of focus time earlier this evening that forced me to think through some things that had been escaping my ability to speak them properly.

Yesterday I went out to lunch with a friend who I hadn’t seen in quite a while. We slurped some oysters and talked about all kinds of things. In a way my friend, A., is a bit of a mentor, someone younger than me that has had more focus and success in life, someone I can look up to, a higher companion, so to speak. We had a lot to discuss.

I had borrowed my MIL’s car as she had a hospital appointment and Missus had our car. I wound up dropping it off around five yesterday, and decided to run back from her house. I wasn’t really up to it, but I did it anyways. I was wearing shorts, and although the temperature had hit the forties yesterday, it was much colder and windy when I decided to go running. I didn’t finish particularly strong, but it was my first run in a week.

I stayed up too late finishing season one of Ozark, and was dragging butt again this morning. I actually went back to bed after Missus left for work to get her booster shot. I spent the day moving files off of my old work laptop and had a couple meetings, then got a fire under my butt that had me converting Machinations framework into a Rust ECS called bevy. I just finished a pretty good pass through the basic components. I actually think I might be able to pull this unified framework off.

Missus went down a few hours after her shot. Her arm hurts, and she’s been in bed except for dinner. Younger and I played a massive game of Uno with our house rules. Elder saw a daddy long legs, more appropriately named a harvestman on her ceiling and didn’t want to go to sleep in her room. She was also complaining about her back. This is what happens when school lets out for two teacher work days and I don’t make the kids stick to schedule.

We’re expecting more snow this weekend, so my mom has cancelled her trip, her very late Christmas trip. So we’ll push that back to next week. I wanted to go to my FIL but his cat died so that’s probably not tactful.

Gamer

The weather is warming, just into the upper thirties, but that’s enough to melt the snow which has been on the ground for the past few days. I didn’t feel like I needed my snow gear leaving the house this morning, and it might warm up enough for me to actually take a run later. I’m overdue.

Younger crawled in the bed in the middle of the night and woke me up. I actually dreamed, but I was awake and restless around four this morning and I didn’t want to get out of bed when the alarm turned on. Missus was sleeping in because she took leave for an appointment her mom has, so I wound up taking in Elder, and getting in a fight with her.

I don’t know if I got on her because I was cranky from lack of sleep or if there’s some deeper psychological issue at play related to my upbringing. I just don’t want to raise a child who’s spoiled and entitled, and doesn’t know how to overcome adversity. I feel like whenever I tell her that things are going to go the way she wants that I have to deal with a bunch of whining and complaining. I had a similar spat with Younger this morning about her laundry, which has been sitting in a basket, unfolded, for several days now.

I told her that she needed to fold it before she goes out and plays with her friend when she gets home from school. But that’ll take forever! No, it won’t, I bet you can have the whole thing done in ten minutes. But I don’t know how to fold it. Yes you do, you know how to fold underwear and pants and shorts. Why don’t you fold it and put it on my bed and I’ll put it away when I get home? And so on.

I forced myself to meditate, but my mind wandered so much. There’s a lot to do for work, as work now encompasses playing video games, thinking about video games, designing video games, and so on. One of my co-workers said that they want specialization, but my specialization is being overly broad with various systems.

I have been going back to some video game design work, researching various frameworks and ways of designing systems, lots and lots of ECS systems. The more I learn about them the less I think they’re suited for the type of architecture that I’m envisioning. I spend more time thinking about it than actually coding. Looking at existing games and figuring out how I would reverse engineer them; researching various frameworks to see how they operate: Unreal, Unity, various Rust, C++ and Python systems, trying to figure out which one fits our use case best.

I’ve been having lots of discussions at work about a unified framework, a cookbook of design decisions between Unreal, our web3, and Solana programs. Part of it feels like imposter syndrome because I’m talking to developers who are way more knowledgeable than I am.

Mood

I was in a foul mood when I woke up this morning. I really did a number on myself this weekend. Saturday the neighbor kids were over, I wound up playing City of Iron with Elder and the older T. kid. Didn’t finish the game because I made an early mistake that changed the direction of the game so much that we called it a day. Missus and I spent some time together, then I stayed up till the wee hours binge watching Ozark. I slept on the couch so as not to disturb anyone.

Sunday was a do-nothing day. We still had several inches of snow on the ground, but I left my snow boots over at my FIL’s house, and had already gotten my fill with the girls on Saturday. I watched a couple more episodes of Ozark before lunch. I was really tired by mid-afternoon. About all I did was watch Bluey with younger, horseplay a bit. Missus made dinner, I watched Eternals before putting them to bed.

I was exhausted. I watched a video on my iPad then passed out. I’d say I slept like a dead man, but I woke up several times. Elder had another accident, which woke me up, and Younger was in the bed, but we didn’t fight too much, thankfully. I guess she was attached to Missus.

I got them both to school, but I wasn’t very patient while I was getting them ready. The whole house is a wreck, snow gear and socks — my god, the socks — everywhere. On the way out from Younger’s school we passed a homeless person pushing a shopping cart full of their belongings down the main boulevard. The cart was full, the guy had a backpack on and another bag in their hand that they were hold while trying to clear some obstacle from under one of the wheels. It was twenty-eight degrees out. “There but for the grace of God”…

BTC and ETH took another elevator down today. That’s another reason why I was foul. I haven’t looked at my Perp positions two weeks in a row. I needed to meditate, then I took a look. The ETH positions are mostly gone, about $30k liquidated. My BTC ones are mostly underwater, but we’d have to go sub-thirties to liquidate them.

I thought I was so clever, but I got too aggressive, too greedy, and Mr. Market has punished me for it.

I’m not so foul a mood now. Meditation helped, and turning toward the problem instead of away helped as well. Or it might be the coffee.

I’ve got my priorities for this morning, so it’s time to get to work.