21 Nov 2009, 1:45pm

by Layne

8 comments

VirtualBox USB with Ubuntu 9.10 Karmic

After you upgrade to Ubuntu 9.10 Karmic Koala, your VirtualBox USB devices will likely be all greyed out. To get VirtualBox USB support working again, you need to add yourself to the vboxusers group. To do this, use the System menu at the top of the screen, then to Administration, then to Users and Groups. Click on the keys at the bottom of the window and enter your user password to be able to make changes. Then, double-click your username and select the User Privileges tab. Scroll down to the bottom and select Use VirtualBox. Logout and log back in and you should be able to use USB devices with your guest OS.

Therac-25

The Therac-25 was a radiation therapy machine produced by Atomic Energy of Canada Limited (AECL) after the Therac-6 and Therac-20 units (the earlier units had been produced in partnership with CGR of France). It was involved with at least six accidents between 1985 and 1987, in which patients were given massive overdoses of radiation, approximately 100 times the intended dose. Three of the six patients died as a direct consequence. These accidents highlighted the dangers of software control of safety-critical systems, and they have become a standard case study in health informatics and software engineering.

via Therac-25 – Wikipedia, the free encyclopedia.

Mount CD ISO image in Windows XP without Daemon Tools/Alcohol 120

Here’s a small but unsupported tool from Microsoft to let you mount ISO images. The included readme file is pretty good, and it worked just fine for me.

http://download.microsoft.com/download/7/b/6/7b6abd84-7841-4978-96f5-bd58df02efa2/winxpvirtualcdcontrolpanel_21.exe

The Pentium F00F Bug

While most people thing of a bug as a programming issue, sometimes there are bugs in hardware, and they are much more difficult to fix, usually requiring a software workaround, as it’s a bit impossible to issue a patch against physical silicon. Here’s a very old but still interesting discussion about a particularly nasty processor bug.

Last fall, a message warning users or a bug in the Pentium/Pentium MMX was anonymously posted on the comp.os.linux.advocacy Internet newsgroup. According to the message, the bug could completely lock up the computer from any operating mode in any operating system. At first glance, the ordinary news reader might say “so what.” After all, many users are accustomed to Windows 3.1/95 regularly locking up. But the placement of the bug on comp.os.linux.advocacy was calculated and intentional. The readers on that newsgroup knew exactly what the bug meant – an ordinary user or saboteur could unleash a program to bring down network servers that form the backbone of our modern networking community. Internet service providers (ISPs), web hosts, government agencies, and computer departments at universities were petrified of the potential damage that this bug could do.

When the processor encounters the instruction F0 0F C7 C8 (or anything from F0 0F C7 C8..CF), the F00F bug occurs. The processor recognizes that an invalid opcode has occurred and tries to dispatch the #UD handler. Because of the LOCK prefix, the processor is confused. When the processor issues the bus reads to get the #UD handler vector address, the processor erroneously asserts the LOCK# signal. The LOCK# signal can only he asserted for read-modify-write instructions that modify memory. When the bus is locked, a locked memory read must be followed by a locked memory write, lest unpredictable results may occur. But in this case, the LOCK# signal remains asserted for the two consecutive memory reads required to retrieve the #UD vector address. The processor never issues any intervening locked write, and then hangs itself.

via The Pentium F00F Bug.

SoftFloat: A software implementation of the IEEE 754 Floating Point Specification

This program is often used to provide verification sequences when designing floating point unit (FPU) hardware IP blocks:

SoftFloat is a free, high-quality software implementation of the IEC/IEEE Standard for Binary Floating-point Arithmetic. (IEC is the International Electrotechnical Commission, an international standards body.) SoftFloat is completely faithful to the IEEE Standard, while at the same time being relatively fast. All functions dictated by the standard are supported except for conversions to and from decimal. SoftFloat fully implements the four most common floating-point formats: single precision (32 bits), double precision (64 bits), extended double precision (80 bits), and quadruple precision (128 bits). All required rounding modes, exception flags, and special values are supported.

SoftFloat

How to compile The Fabulous Logic Analyzer on Gentoo Linux

Linux being Linux, most distributions seem to keep things in different places, something that tends to mess up compiling software (although it shouldn’t!). I wanted to try out a program called The Fabulous Logic Analyzer, which uses your PC’s parallel port as a digital logic analyzer for debugging all kinds of digital circuitry. Unfortunately, the source build didn’t work out of the box, and the only instructions I could find were for Ubuntu. After consulting a Gentoo expert I know from college, we eventually got it working:

  1. Download and unpack source package: http://prdownload.berlios.de/tfla-01/tfla-01-0.1.4.tar.bz2

  2. The big challenge was finding the proper paths for these environment variables. Use these two export commands to set the build environment variables.

    export PATH=/usr/qt/3/bin:$PATH
    export QMAKESPEC=/usr/qt/3/mkspecs/linux-g++

  3. Use the qmake program to create a standard Makefile for this project:

    qmake tfla-01.pro

  4. Build the source:

    make

  5. Look in the bin/ directory, and you should have a freshly compiled binary, hot from the gcc oven.

Arch Linux Package for TFLA

11 Sep 2008, 5:10pm

by Layne

1 comment

Latex + Inkscape = Awesome

Inkscape is perhaps one of the highest quality open source projects I’ve ever seen. The user interface is terrific, and everything about the program is high quality. It works great no matter what you’re using it for, from designing logos for the web or designing a conference paper to be printed 36″ by 40″. The perfect quality vector art you create with it can be scaled up to any size.

The only downside to using Inkscape for math/science type work, is that it didn’t support any sort of mathematical notation. Sure, you could always manually align the exponents and super- and sub-scripts, but that’s no fun. A project I just found called Textext is an extension for Inkscape that will render a LaTeX string as an SVG element. It even allows you to go back and make changes to your rendered math notation. Pure excellence!

Example of Textext output

Matlab Upazila

Matlab Upazila

Matlab is an Upazila of Chandpur District in the Division of Chittagong, Bangladesh.

Matlab is located at 23.3500° N 90.7083° E . It has 76,266 registered housing units and a total land area 409.22 km².

Matlab Upazila – Wikipedia, the free encyclopedia


2 Oct 2007, 7:11am

by Layne

leave a comment

Producing Open Source Software

Karl Fogel has written an excellent guide to managing and open source project. The experience is based on his experience with the Subversion source code repository project, and includes a lot of good advice. It pretty good reading, but is about 860 KB worth of text.

This book is meant for software developers and managers who are considering starting an open source project, or who have started one and are wondering what to do now. It should also be helpful for people who just want to participate in an open source project but have never done so before.

The reader need not be a programmer, but should know basic software engineering concepts such as source code, compilers, and patches.

Prior experience with open source software, as either a user or a developer, is not necessary. Those who have worked in free software projects before will probably find at least some parts of the book a bit obvious, and may want to skip those sections. Because there’s such a potentially wide range of audience experience, I’ve made an effort to label sections clearly, and to say when something can be skipped by those already familiar with the material.

Producing Open Source Software