 Computers keep changing the world, but their power and safety is limited by their rigid design. The T2TILE project works for bigger and safer computing using living systems principles. Follow our progress here on T Tuesday Updates. This is the 42nd T Tuesday Update. Let's get into it. I want to start today with some hardware stuff. I've been looking at trying to understand how glue works for PLA and to put it on acrylic sheets. It took me forever to figure this out, so I wanted to share it with you all. We'll take a look at this and then we'll come back. So it begins with like a jeopardy question. This glue that works for PLA and acrylic is strong, cheap and easy to find. What do you think it is? Let's take a look. So I done a test run to attach the female feet of the tiles to an acrylic sheet using two-part epoxy resin. And that worked pretty well, and that's the sheet that I've been working with. But it was really kind of a pain in the butt because you have to stir the stuff and it kicks really quick. So even just getting the feet for nine tiles down so I could lay the whole thing down before the stuff started to harden up was stress inducing to say the least. And I really didn't think I could get 16 of them all done in any reliable way. And so I started looking for other glue solutions to connect PLA to acrylic. And googling around it seemed like it wasn't all that clear. It wasn't like there was a single solution. People were saying do this and referring to other people's discussion of how to do it and so forth. I found one page on Hackaday. It was very helpful. A guy, Tom Nardi, saying that he was figuring out what if you were trying to bond acrylic to PLA using just locally available stuff and he had a picture of all the glue section in Home Depot. And he did a comparison. He said his go-to stuff, if he wasn't getting locally sourced, if he was buying it on the net he would get this weld-on 16 stuff that he liked. And then he tried a bunch of other stuff and I said, well, okay, but if I'm going to go to Amazon, go to the internet anyway, let's get this weld-on 16 stuff. So I looked for that. I found what the, you know, it's Amazon's choice. So he said CyGrip 16, but Amazon's choice for weld-on 16 and so forth. So I said a tube of that is $11 and it comes from, you know, Amazon, whatever. Great. I started reading the reviews and there was a bunch of weird reviews including people that had pictures saying, you know, they got this tube that had another label put on top of it and a couple of people started picking the extra label off and underneath it, it wasn't weld-on 16, it was weld-on 705. And so, you know, I Googled weld-on 705 and it's PVC cement. And, you know, I've used PVC cement, you know, for the plumbing fixtures with the purple stuff, the primer that you put on, and then the glue and you put it in, it sets really fast and it's strong. I mean, it's basically welding the PVC together and so now I start to think, well, geez, if it's really weld-on 705 inside the weld-on 16 tube, just at a higher price, maybe I can just go get any old PVC cement at Home Depot and I'll be all right. I mean, there's a whole bunch of those. So I went to Home Depot, but I went to a different section. I didn't go to the super glue section. I went to the PVC glue section and I got this, you know, OD medium gray PVC cement, you know, whatever. I got it because it seemed like it was maybe not as fast. I was worried about the stuff being too fast because of the epoxy. And I tried it and it worked terribly. So much for that idea. I let it cure for a while. So it turned out that, you know, having it be too fast was not a problem. But even after letting it cure for a long time, I could just twist the foot right off the acrylic sheet. So that idea was a bummer. And I said, okay, so now I'm back to square one. But a couple of days later, I said, well, I don't know. I mean, maybe I could try, if the speed of the PVC cement is not the problem, maybe I can go try some of the faster stuff. So I went back and I got a bottle of this OD fusion stuff, which is supposed to be primer and cement and one, plus this classic separate thing, the purple primer and then the PVC cement. And I tried them today. And here's what happened. So this stuff was crap. This thing, fusion single step clear as instead of gray and clear is obviously good. Oops, there we go. You don't need the horizontal grab. Wow. All right. Jeez. Wow. I'll take that as encouraging. 15 minutes for good bonding strength in two hours. Get some parallel waiting. So that let that go for a few hours. What the heck? I don't know. After the medium gray PVC cement was so bad, I was pessimistic about this, but it might be okay. We'll see. Two hours into these guys want to cure. Screw it. That's pretty good. You need a pretty stiff at first, but that one's good. See, even spins. So it's being held by the geometry and not by friction. All right. So the idea would be to start anywhere and start tiling out, gluing them down. Don't have to do the whole thing at once. Do, you know, for whatever it is. And, you know, the important point is getting the degree of freedom in the rotation of the feet squared up as best as possible. Since this stuff is number one is cheap and number two is easy to use. So, well, relatively speaking, I guess that would go with the fusion. One step, if it really is, because it's clear. Look at that. Great. Okay. But then the idea would be you could cut the acrylic afterwards. So that half of this guy now, of course, it might be better to actually have the thing overhang. But let's give it a try. If we put it on the table saw, is it going to vibrate these things off? Oh man, that seems pretty good. All right. Step by step and through. There's your answer. Undercut this guy. I bet he's just going to vibrate loose as well. Not a very lovely purple and blue appears to have hung on. So there it is. The bottom line, you know, yes. Traditional, regular old PVC primer and solvent bonds great. Now, I think having gone through this, that is probably if you want to pick one single factor, it's the purple primer, which, you know, actually softens the plastic and so forth. And so if you're doing, you know, teeny tiny little detail work and you can't stand to have a little bit of your surface soften up or your tolerances are too tight, then this is not for you. I use superglue or whatever it is. But otherwise, if you want actual weld, I think, you know, you get the purple primer. You probably could use the other stuff. You could probably use any PVC and get, you know, Q-tip swabs, whatever, a little purple primer. Boom, you are good. So, hope that helps somebody. It was a little bit of a surprise to me that I could get a good PLA acrylic solution just at the hardware store. Okay. I skipped over a thing last week when I was, so we were talking about the, the getting intertile lock grabbing going, which is half of the task of what has to happen between the times. You've got to grab the lock at the beginning of an event. You do the event and then you send messages saying, okay, change this, change this, change this. So part of it is locking and the other part of it is sending packets with cash updates saying what changes were made. And the locking really needs to be fast because that's basically in our most loop. Every time we're at the edge and we want to have an event, we have to say, can we get the locks? So we got it from like 300 milliseconds down to 150 microseconds, which was great. But as I skipped over for lack of time last time, there was a very strange little factor that I noticed, which is I had this, this tester that was, you know, picking, you know, you pick six bits, saying, you know, if it's a zero bit, I don't want that lock. If it's a one bit, I do want that lock. And the way it works is that the user space, the program, eventually it'll be MFMT2. Right now it's just a test program lock stats sends six bits off to the kernel saying which locks it wants and which locks it doesn't. And then we see what happens and then we score it and we wait until we get them and so on. And every so often the locks would take too long to settle. And my lock stack, I would declare a failure that it came back and it wasn't what it was doing. Now when lock stat did do that, it would go ahead and check again after waiting a little bit and usually the last lock would come in. So it was just late. It wasn't like it was broken. And the thing that was weird was that it was at first it was always East that was late. And why would that be? The whole point of this is that it should be spatially isotropic, everything the same in every direction. So if East is always being the one that's late, that's weird. Eventually I made lock stat a little more sophisticated. So it might grab these locks or it might grab those locks. And then it ended up either being East or West that was always late. So this week I spent a lot of time building up a mechanism to record locking events. And these are happening at the millionth of a second granularity. So it's not like I could just use printfs to say, okay, I tried to grab the lock. This stuff is happening. It interrupts. There are edges that are coming from the neighbors. There's an electrical signal going, whoop, and that's causing the kernel to interrupt and say, do my code. That's how we're buying speed. So what I decided to do was to build an internal buffer inside the kernel module that I could make it as fast as I could using another one of these k-fifos that I had so much trouble with in the previous weeks. But now I have a little bit of comfort with to buffer up all the events in whatever form I can do quickly. And I have a program to read them from user space and somehow decode them. So I made a bunch of to-do spin locks, make events, checked them off as I got through them. Eventually I had it so that my program, if I just dumped what was coming back to user space, it was like all this gobbledygook because the point was it was formatted in a way to be tight and quick to generate. So then I needed to get a program running in user space to decode it. So eventually I did it and I started getting stuff like this. And it was fascinating. So right entered from user. So that means I made a call saying, please set these locks, release those locks. I gave it six, which is two one bits and four zero bits. Well, it's eight, but in hexadecimal and base 16. And that said, six says I want the southeast locked and the southwest locked as it turns out how it works. So southeast went into S take mode. It's state machine went into I want this thing. And when it's in that state, it says I'm requesting the lock. So southeast output request lock. That means it's driving a pin high, which is going to cause an interrupt on the neighbor to our southeast. Same thing for southwest. We're going to take and so forth. And so here, you know, this is the beginning of relative time, five millions of a second later, four millions of a second after that, and so forth. And then a huge relatively speaking 62 milliseconds. After all that happened, we got I grew locks at I is an input bit saying the other guy granted us the lock. And so that's what we wanted to do. So it's 62 microseconds round trip for that part of it. And then a few moments later, eight, well, nine microseconds later, southeast also responded. I grant you the lock and that's an event done. So this lock tracing vulnerability visibility, although it took a couple of several days. That was the major software business of this past week. It is just really great. It's been great for debugging. And I'm sure it'll be great for optimization going forward. There's a basic principle I have of, you know, developmental software, research software that, you know, an hour spent improving your visualization always payback 10 times in terms of insight and helping you solve problems down the road. And indeed, once I had this and I could look at a bunch of traces and figure out what was going on, I solved the mystery of why East and West are always late. And so the question, if everything is balanced, how can possibly be always East and West that are late? And the answer is it's not because of the kernel module. It's not because of the hardware. It's not because of anything inside the thing. It's because of the lock stat program. The lock stat program was test in cases just by counting zero, one, two, three. And then it was taking the bottom six bits of that and sending it off to say, I want these locks and I don't want those locks. So East, it turns out, is the least significant bit. It's the rightmost bit. And that means in binary counting order, it's going on and off and on and off and on and off. So that means in every next step, it's trying to undo whatever it did. If it had it, it wants to release it. If it didn't have it, it wants to get it. Whereas all the other ones are flipping more slowly. So conceivably, some of the other bit could have been late, but in fact, it was always East and West. And in fact, when we went ahead and made lock stat, instead of doing incrementing in order, because I thought it didn't matter, once I made random tests, then the problem went away. In traditional software engineering, when something isn't deterministic, when something isn't repeatable, you go and debug it. In this case, when something is repeatable, you go back and debug it. Okay, so at a time. Next week is Artificial Life 2019 in England. Next Tuesday, we'll be in Newcastle upon the River Tine. And I hope to have something. It won't be a full-on update, but I hope to have some little bit of news to check in with you. Have a good week.