Assembly

My section of Engineering 100 is Microprocessors and Toys, and having started with combinational logic, we progressed to finite state machines, then instruction set architectures, and finally to Assembly. We implemented simple instructions in Verilog, and we are now finally programming on that processor in Assembly. It’s oddly gratifying, although I have many gripes about Assembly. We are using E100: a heavily simplified instruction set without programmer-accessible registers, but even so these difficulties seem basic enough to be widely applicable. So far, the bugs we’ve run into have not been problems with overall logic but with return and jump addresses. An incorrect return address can often restart the program: memory by default holds a value of zero, which is also the address of the start of the program. This makes for an especially baffling form of infinite loop. Using the incorrect destination label for an unconditional branch leads to chunks of code mysteriously remaining unexecuted. I hope we figure out how to do this better, as currently it is often difficult to tell even what the values of variables are because on the emulator they are just one of many hexadecimal values out of several pages of them. Without the emulator it would be even more difficult. I’d rather stare at a page of numbers than have to add wait-for-key loops and hex digit outputs for each breakpoint and value I was interested in.

Published
Categorized as Coding

Gitolite, Lighttpd, and GitPHP

I had some trouble setting up GitPHP running under Lighttpd when using Gitolite. GitPHP is a PHP clone of gitweb, which allows web-browser-based repository viewing, and Gitolite is a very nice Git permissions manager. I needed the webserver to have read access to the repos, so I set the group to www-data, but as Gitolite was managing them, each commit would reset the permissions. I couldn’t get it working by adding www-data to the git group as suggested and would make sense, which I think is a lighttpd issue. The group sticky bit solved this problem by stopping the group owner from changing. I didn’t want the Gitolite configuration repos displayed on GitPHP too, so I pointed GitPHP at a different directory than the one the repos were actually in, and filled that with symbolic links to the repos it should display.

Published
Categorized as Software

Still alive!

I’m still very happy that I’ve dropped physics. My class load is much more manageable. In Psych we have to do behavioral conditioning to improve something about ourselves, so I’ve chosen to try to reduce the amount of time I spend distracted on Reddit when I’m trying to do schoolwork. For the week before break I kept track of time spend trying to do schoolwork, and what of that time I spend browsing Reddit. This coming week I will record my time usage again, but this time whenever I focus on schoolwork for an hour or more without getting distracted on Reddit, I will give myself a 50% chance of the option to play Minecraft for 15 minutes guilt-free. Let’s hope it works.

I’ve begun to contribute to open source projects that I use. It does require knowledge of source control and communal development procedures, but it’s a great feeling to give back, even though my efforts are relatively small. Also, chmod uses X to give execute/search permissions only if someone else already has them for that file/directory.

Published
Categorized as Life