CPU Upgrade!

I was having trouble hitting framerate in Beat Saber, especially with spectator view smoothing on in Koto. Upgrading the CPU helped a lot:

Ryzen 7 1700 with wider and higher frame time distribution.
Ryzen 7 3700X with narrower and lower CPU time more in line with GPU time.

Announcing Raspberry Launchpad

I’ve been working towards this for several months, but today I finally wrote initial software for the thing:

It’s small; the screen is about 2″ diagonally.

The intent is that this provide useful information as you’re getting ready to go out the door. What’s displayed in the image above are easier, proof-of-concept things:

  • Sunrise and sunset times (this still required dealing with Daylight Savings Time, as if I needed another reason for it to annoy me)
  • Day and date
  • System uptime

As it is now I have it refreshing on the hour.

This is just the beginning, though! I hope to add support for configuration files, and weather and bus information too. It’d be nice to know what sort of temperatures to expect that day, and whether I’m likely to need an umbrella. And when to leave for the bus. (I have USB speakers so it could chime.) The e-ink display (PaPiRus Zero) I’m using has some tiny switches on it, but they’re not easy to use at all, so I’m hoping to figure out how to use a handful of keyboard keys. 3D printing will likely be very helpful with that.

It’ll involve more hardware work, but I’m also hoping to have this thing provide a UI for measuring the weight of my cat’s food and water bowls. Currently I’m doing it manually, and I only get a start and end measurement for each day at varying times, so there’s a lot of slack to it. If I automate it, every few minutes will be no problem, and I can get an idea of his consumption rate. Graphs! This seems likely to require more soldering, as I haven’t been able to find a USB scale that operates in grams, but I have been able to find someone else with the same problem who solved it by soldering things.

You can find the code here.

Hard Drives

It’s not a question of if, but when. Hard drive failure has been a large part of my life recently: this server, my desktop, my roommate’s laptop – and all I can easily do is keep an eye on smartctl. More realistically, I should likely configure smartd to do it for me, but that’s for another day. Resizing an encrypted partition is rather…. manual. Apparently the way to extend a partition in fdisk is to delete it and recreate one with the same type and starting position but farther endpoint. Nerve-wracking. At least I have yet to lose data to hard drive failure. Part of it’s being careful – backups; checking drive health – and part of it’s luck. My roommate’s laptop hard drive died completely and without warning. Storage is fragile.

Problem Types

I find that among my least favorite types of problems are those that I’m unable to learn from. My main system drive was spontaneously remounted read-only, and upon Alt-Sysreq-reisub’ing, the OS didn’t come up and I got “error: partition not found” and a grub rescue> prompt that couldn’t do anything; not even “help.” I pushed in all the SATA cables and it came up, but upon reboot the drives were out of correct boot order. Bizarre. The part about this that scares me is that I’m for the most part unable to learn anything from this, and I wasn’t able to do anything to stop it from happening again because I don’t know why it happened. The same thing applies to the mysterious times this machine goes completely unresponsive while idle or suddenly doesn’t have video on boot, then spontaneously regains it. The former has happened a few times, the latter only one.

From programming in assembly, I finally realize how segmentation faults are really nice compared to the alternative. Data and instruction separation is a luxury. Miss a bounds check and suddenly you’re executing things not intended to be instructions and you get really weird opcodes and the whole thing dies. It can get really frustrating.

I realized the only reasons my server has gone down at dad’s are due to external forces: either the power has gone out at the power outage or circuit breaker level, or cables have been unplugged by unwitting family members. I wonder how much better colos are. ChunkHost was really nice, and I’d have likely continued once my “free beta” ended (I have my suspicions it’s a marketing thing for “free trial”) if I had more disposable income to the point where I felt I could justify a monthly fee.

EDIT: I had forgotten the time it went down as I was upgrading from Debian Lenny to Squeeze. I had set up a virtual machine for fallback, but I didn’t end up using it: in restoring the VM from backup I unknowingly uncovered a configuration problem with one of the hosted sites that showed up a few days later on the main server. Whoops.

ADC

The ADC makes more sense now. It turns out Professor Atkins has been waiting as we figured out that the weirdness we’ve run into is due to tremendous electromagnetic interference. My math GSI was incredibly kind and willing to spend about an hour helping me fix the statistics. I don’t know why the corruption I ran into was occurring, but we did establish that what GSL calls total sum of squares is actually variance. I’ve added a real TSS function, as well as an output of absolute value of residual. Here’s the best graphs we got previously, rendered with the latest graphing routine:

ADC3 with latest graphing.

ADC5 with latest graphing.

ADC6 with latest graphing.

I didn’t want to disrupt the servo guy’s work much, so I moved Gumstix over to the power supply and set it back up. I didn’t use the breadboard to ground the unused ADCs, and put them all in the same alligator clip instead. I thought I would calibrate two more channels so that we’d have a usable input for the gyro reference voltage. I was very surprised with the results:

Behold ADC2!

Behold ADC7!

This makes so much more sense for many reasons. As I pointed out yesterday, there was a consistent, significant distortion under 1v. This is nowhere to be found in the new line. It’s actually a line, and there is only a minuscule difference in counts for the same voltages between graphs. This is acceptable as imperfections in the voltages we fed it as in this respect our power supply is… abstract. This line also goes up to 1024 at 2.5v, which is what it should actually do as it’s the maximum count at the maximum voltage. What I find amazing is how huge the effect of electromagnetic interference is! We got completely different information when using the breadboard, and even its imperfections were consistent! Professor Atkins revealed that she had let us spend hours on this fruitless calibration of electromagnetic interference so that we would thoroughly learn the importance of electromagnetically clean wiring. Lesson learned!

Engineering and Minecraft

It’s been a while. I get the feeling that I’m writing to an empty room, which contributes to the lack of content. If this is not the case, please let me know. These are still nice to write sometimes though.

I’ve discovered Minecraft. It’s a sandbox game like no other. The world is a natural landscape generated out of one-meter cubes: hills, mountains, valleys, caves, forests, beaches, deserts, plains, tundra. The fact that’s it’s generated makes it not only different each time, but also incredibly huge: the maximum size of the Minecraft world is limited only by the precision of a 64-bit double. This apparently works out to eight times the surface area of the earth. There’s a lot of exploring to do. However, that’s not all that makes Minecraft different: there’s no goal. There is no objective that the player is pushed to, other than to make their own. I can easily see this being a bad thing for some people, but after playing my fair share of linear games I find it quite refreshing. The player starts out with nothing more than a pair of hands to manipulate the world and works up from there: resources can be gathered to form ever more powerful tools, which can be used to manipulate the world faster. As it’s constructed of blocks, the entire world can be removed block by block, and placed back as seen fit. This allows for the construction of huge castles, tunnels, pits, mines, houses, and highways. There’s a pride in standing inside a shelter built with one’s own virtual hands. I also found Minecraft-Overviewer, which is an application which parses Minecraft maps and renders them into Google Maps tiles so that it can be inspected from above at multiple zoom levels, which sets it apart from single-image renderers such as Cartographer, although Cartographer has many more options. If you’re interested, you can view my world, but I warn that I haven’t built much above ground and it brings the lack of upload bandwidth into sharp focus with its slowness. But it’s there. (EDIT: never mind.) Monsters spawn in the dark: nightfall is terrifying.

In my engineering course I’m part of a small group that elected to automate a small hovercraft instead of relearn programming concepts we’ve already been over multiple times. Instead of learning more coding, we’re focusing on hardware. Our current status is soldering the chips on a board so that we can attach is to the rate table without it flying apart and eventually mount it on the hovercraft. I spent a few hours with gnuplot_i and GNU Scientific Library to make these graphs. I know the value of R^2 is wrong, I’m not quite sure what it is as I’m having trouble with the statistics functions in GSL and have never taken a statistics course. I hope to get it sorted out soon.

Graph of ADC3 calibration

Graph of ADC5 calibration

Graph of ADC6 calibration

What these show is the data we collected for the channels: we fed it known voltages in 0.1v increments and recorded the count given by the ADC, then found a best fit line for each one. They’re similar, but slightly different: I hope the difference isn’t just sampling error. At the very least they all seem to dip down until around 0.4v and float up until around 1v, so we may need to make something more complicated than a straight line to account for that.

Heading Off to College with The Monolith

It’s official: I’m registered for classes at the University of Michigan and I move into the dorms August 31st. Although I’m excited to learn more, go onto another stage of life, and experience what college has to offer, this summer has been excellent, and if I could repeat it or just sections of it I gladly would. I’m rather scared to move on; I think I will be able to handle the independence, though it will surely take time to get used to it. Most of all, I feel going off to college will mean saying goodbye – the phone just isn’t the same as being in the same room.

My cat died – our guess is either a seizure or a stroke. It was very sudden, and marks my second pet to die unexpectedly and swiftly. I’m glad that at least she didn’t suffer long. In a few hours my knowledge went from “your cat is sick and at the vet” to “your cat is dead.” I was shocked. By this point I’m okay, though.

As a graduation present, I built a $1,500 desktop and upgraded to a widescreen LCD.

Phenom II x 4 @ 3.4GHz

8GB DDR3 RAM

1.5 TB HDD

ATI Radeon HD 5770 1GB GDDR5

It runs incredibly smoothly. The bottleneck is of course the hard drive. I’d have gone for an SSD if they were reasonably priced, but that day has yet to come.

I’m enjoying my internship at IDV. I’ve gotten to look at both the sysadmin and developer side of things. There’s quite a learning curve to coming up to speed with a new codebase, but I got it. Coding requires long bouts of focus, while sysadminning can be more intense, but frequently stopped by waiting for the computer to complete some semiautomated process. I’ve also done more work on Cavez of Phear.

Keep on keepin’ on

My social life is shifting away from these precious tubes of ours in many ways. Being within walking distance of places I would actually want to go really helps. I find it far more fulfilling to talk face-to-face with people, and the Internet, Reddit in particular, seems to just fill that void with funny captioned pictures and the occasional interesting article. I’ve been keeping a journal of sorts and that’s proven enjoyable. The freedom that the summer and my parents give me is fantastic.

I have an internship at IDV and it’s interesting. I am happy to report that when actually coding, such as in C#, much less so in configuration files, programming techniques are generally applicable. It’s nice after floundering around to have little sections of activity where I actually feel like I know what’s going on.

As a graduation present I’m putting together a monster gaming rig. I was very happy to be notified that this would happen. Once I get the parts and snapped together ordered I’ll put together a writeup on the build.  I’m looking forward to it.

New Machines!

My dad’s work got new computers, and instead of throwing them all out, I got two.

Pentium 4 @ 3GHz with HyperThreading

3 GB DDR 533 MHz

160GB HDD

I’m moving my graphics, sound, and Gigabit Ethernet card over to one of them, which is my new desktop. It’s not true dual core, but the clock speed increase alone is enough to warrant a move. I don’t have Windows on it yet, and I intend to get Windows 7 if my dad’s work isn’t able to loan me a CD to reinstall XP. Hopefully this machine will be able to handle Assassin’s Creed without stuttering. I plan to remove my 1.5TB external from its enclosure and mount it internally over SATA. That should fix the horrible latency and throughput issues I’ve had over USB. The other machine I have working as a Freenet node. I’m using full-disk encryption on both machines, and it’s cool. There doesn’t seem to be a drastic hit to performance, as I feared. The only issue is my own fault: I almost forgot the encryption passphrases, and actually forgot the root password on the Debian box. I remembered it, though.

The machines run fairly hot. I now have a mouse-hand heater. That doesn’t seem good. The room is warm, too, and I’m not sure how much of that is due to the sun, and how much is due to the three computers. My network architecture confused me by doing exactly what I told it to do. I set up static DHCP mappings based on MAC address, then DNS entries based on those IPs. This allows me to ping dad.asksteved.com and have it resolve locally to my dad’s machine. It didn’t occur to me as I moved my Gigabit card from my old box to this new one that the IP and DNS entry would follow. It took me a while to realize I was trying to log into myself, which was why the key wasn’t matching. It was pretty funny. The old box is going to work on MilkyWay@Home. My next step is getting the requisite power strips and Ethernet cords to put the two non-desktop machines in the closet. One of them could run the alarm songs in the morning so that I don’t have to keep my desktop on at night.

Homework’s going well. I have a small amount of additional Precalc studying possible, then AP English. Comp Physics is done.

Essay and More

The first draft of this is dated October 18th, so many things in it are now dated, but here goes.

I’ve been thoroughly shaken by an essay question on a college application. Not that it’s a difficult question or anything.

Tell us about a time you used your creativity.

It should be easy enough. The problem is I’m having trouble thinking of recent uses of my creativity. I haven’t made any new Flash movies since 8th grade, although perhaps that’s for the better. They’re becoming increasingly embarrassing now. I made some comics Freshman and Junior year, but thaose were both for literature projects. I started making a 3D maze the last time I went to Camp CAEN, but that was the summer before last, and I stopped after I ran into an issue with sound under Linux in Zenilib. Writing about it makes me want to try picking it up again, but finding the time to do so will be difficult. It seems I have somewhat inadvertently found ways of being unproductive that are not obviously so, such as browsing Reddit instead of playing TF2. That’s not to say I’m not working hard, which I am.

My Dad’s Rosewill fan failed suddenly by making horrible grinding noises. Although PCI slot fans seem like a good idea, they might be too much trouble to be worth it. I’ll probably stay away from PCI slot fans for the time being.

Because I’ve had so much homework, namely in Precalculus, schoolwork has displaced my life somewhat. Synthetic division is nice because of the very predictable amount of space it takes up, and it’s oddly fun to multiply together factors to get a polynomial with the desired zeros. It’s making the math work to make something, rather than the other way around. It’s also strangely entertaining to factor in my head.

Thanks to this page I was able to figure out an otherwise extremely cryptic error in my crontab. It was in the line for server backups to the alarm upstairs. It’s not offsite, but at least it’s not in the same room. I also got GZIP compression working, with the assistance of these pages. To boil it down, the magic line is ob_start("ob_gzhandler");

I recently downloaded Cavez of Phear and it was fun. However, the lack of save functionality made it frustrating, as I had to continually replay levels after dying. As it is open source, and I had compiled it, (requires libncurses-dev) I decided to crack open the code and give it a go. With the very low number of comments it is somewhat difficult to read. It seems that once it loads in a level file made of of low-level, unprintable ASCII, it replaces special objects with the stone character, and makes entries in another array. I have yet to figure out why it needs another array for this. I’m also currently mystified as to why the save function (I didn’t write it, it works in the editor,) produces complete gibberish even right after I load the map and haven’t moved. It still does this when I undo the replacement of special items. I’ll probably have to rip chunks out of the program until it’s more evident. I really should try gdb. Maybe I should start a Git repo to make all this easier to manage, as although my memory is fuzzy on the matter I think I had parts of this working better before.

Despite my problems figuring this out, it is meaningful for me because although I’ve long known philosophically and logically that open source is far better for innovation and rapid development, I’ve never been able to directly participate in helping that process. (I’ve donated to and reported bugs for Wine, but that’s about it.) Even though it is a very simple contribution, it’s something that with a closed-source product would take emailing the developer or doing some strange dark arts with DLLs. With open source, I am able to open up the code and start to add a new feature. This is amazing.

I got my plate of food together and left it in the kitchen. Asking my sister to guard it against cats, I took my salad and milk out to the table. I returned for my plate, and noticed the empty one intended for Sarah sitting on the counter as Sarah held a full plate. I asked her if the plate was mine. No, she mumbled around the ham.

Matt called me over and asked if I wanted his old machine. He said it had stability problems. I’m now agreeing with that, as when I tried to connect to it just now to check the specs, it was unreachable. What I can remember is Athlon 39(?)00+ 3700+ at 2.4 GHz with 512MB RAM. It seemed stable at first… Maybe I should check the BIOS settings again, as I seem to recall it complaining about failed overclock upon POST.