Panera Login Fix

If you’re having trouble loading the Panera captive portal login site, set your network preferences to obtain DNS information automatically instead of manually.

Control -> Network and Internet -> Network and Sharing Center -> Change Adapter Settings -> Right-click relevant adapter, usually Wireless Network Connection -> Properties -> Internet Protocol Version 4 -> Properties -> Obtain DNS server address automatically

Simon Already Did It!

Science and industry are bubbling with exciting new computational techniques. Parallel processing, quantum computing, GPU processing, software transactional memory. Proof-of-concept programming languages are mushrooming, but Simon already did it.

Simon Peyton Jones’ crazy academic language Haskell can do all of these things. The Hackage repository has packages for parallel processing, quantum computing, GPU processing, and software transactional memory. If there’s a buzz on some new computational technique, Haskell already did it. It’s an incredibly flexible prototyping system.

How does Haskell do all of these things when typically, each of these techniques is explored using an extremely limited prototype language? Haskell is a functional language with powerful domain specific language capability; you no longer need to trade research papers in a dozen languages when it’s easy to prototype an experimental language within Haskell.

DSLs are featured in Lisp; what makes Haskell so special? The secret sauce is declarative programming: In Haskell, the coder describes the computation to be performed, and the Haskell compiler decides an optimal way to perform the computation. Imperative programming is eschewed in favor of pure functional programming: mapping, composition, recursion. By using single assignment and avoiding state, Haskell gains flexibility in how it executes code.

Haskell does event driven computing, concurrent computing, matrix computing, even lazy computing, by isolating imperative code in monads. There are monads for pseudorandom number generation, monads for I/O, monads for multithreading. The accelerate package for behind-the-scenes GPU computing is just a monad that turns Haskell vector manipulations into CUDA, executes it on a GPU, and returns the Haskell-typed result.

The final ingredient is generalized abstract data types. When you create a data type to model something in the real world (employee IDs, aquarium fish, highway traffic, etc.), Haskell can derive how to print and parse the models from text files to live objects and back. It can determine on its own how to compare and sort sequences of data. Finally, Haskell can automatically manipulate arbitrarily complex collections of data (databases of employee IDs, store rooms of aquarium fish, graphs of graphs of graphs of highway traffic). A bloom filter of schoolmates? No problem.

There is no longer a need to learn Unified Parallel C, QCL, CUDA, libev, or MATLAB. Haskell already did it; just learn one language that can handle all these paradigms and paradigms yet to be invented. There are many free online tutorials that enable you to use graduate level techniques with an undergraduate’s knowledge. Haskell’s language prototyping flexibility makes C look like Brainfuck: you’ll still succeed, but wouldn’t you prefer to do it with more robust, more expressive tools?

Why I use Rust

Lambdas! And decent docs.

USB Obsolescence

no usb signUSB flash drives used to be the hot new thing, but like all computer hardware, they’re now phasing out. You may have received a shiny new thumb drive on Christmas day. Here’s why you probably returned the plucky stick back to the store.

10. You have Dropbox, Ubuntu One, or some other free file hosting service and no longer need to ferry files by sneakernet.

9. You have a laptop, smart phone, or other portable computer. Some geeks take pride in running full operating systems off of thumb sticks. It’s more trouble than it’s worth.

8. You have a portable music player. While you could install CoolPlayer+ and other portable apps onto your USB drive, your iPod already functions as one, with a built-in player.

7. You have an ereader device or app. PDFs can go on USB drives, but what better way to enjoy them than on a Kindle or iPad?

6. You can’t remember what a gigabyte is. Some people deal in terabytes now. Anything less is pitiful; how else would you store your digital movie collection?

5. USB transfer is too slow for your needs. Another endorsement for Dropbox: It uploads and downloads unusually quickly for a free service.

4. WiFi + Shared folders / DropCopy / netcat.

3. BD-RE.

2. Viruses, privacy, it’s so easy to lose that tiny thing, where oh where did I put it last?

1. The Internet, or as hipsters say, “the cloud”.

The USB protocol is here to stay, in some form or other. It’s tremendously convenient to be able to connect various and sundry devices through the same port. But USB flash drives can only lose as cloud storage space becomes cheap as free and the Internet becomes ubiquitous.

Security in the Cloud

Privacy concerns keeping you down? Think Dropbox is hoopy but insecure? Then try Cyphertite, its encrypted cousin.

TSA Fumbles

In Die Hard 2, John McClane refers to a (fictional) Glock 7, a porcelain gun that fires only once, but is undetectable by X-ray. The ammunition would still be metal, resulting in detection by airport security X-rays.

The problem isn’t solved there. Plastic knives probably make it through X-rays undetected. Furthermore, TSA dramatically features, as only security theater can, the X-ray screens that TSA officials use to scan passengers. Patience and a few cheap flights could help a misanthrope test whether his weapons of choice are visible on screen. A better setup would hide the screens behind curtains, like old photographers, or to fork out the cash for the laptop privacy filters advertised inside in-flight magazines.

rEFIt Troubles Resolved

refit logoMaybe you dual boot. No, maybe you triple boot. Maybe you have a complicated partition scheme juggling multiple boot record tables, and it just isn’t working.

I use Boot Camp and rEFIt to dual boot between Mac OS X and Windows 7. I recently added Ubuntu to the mix. But rEFIt has trouble synchronizing the GPT and MBR records, and as result, Mac OS X and Ubuntu boot fine, but Windows boot fails with the message:

Windows failed to start.

ENTER=Continue ESC=Exit

Ubuntu’s GRUB overwrote the Windows boot loader, corrupted the GPT-MBR tables, and crashed the GUI every ten minutes. Now I remember why I used to install Ubuntu in a VMware virtual machine. It’s less hassle. I decided to uninstall Ubuntu, fix GPT-MBR for rEFIt, and fix the Windows MBR.

It’s worth trying to sync GPT one last time. Install gptsync, either with Synaptic/apt-get, or if you’re like me and Ubuntu fails to recognized either of your network interfaces, by manual download. Assuming you have only one hard drive, you will target /dev/sda.

$ sudo gptsync /dev/sda
Status: Analysis inconclusive, will not touch this disk.
Error: Not Found returned from gptsync.efi

Rats, that’s the same error rEFIt displays. We might as well use GParted to remove Ubuntu.

You’ll find GParted under System -> Administration -> GParted. After a few minutes, GParted will identify the partitions. If you decide to remove Ubuntu but keep Mac OS X and Windows, you’ll want to delete the ext4 partition then grow Windows to the remaining free space. Don’t forget to apply the changes.

The MBR still needs to be fixed. If you have a Windows or FreeDOS CD handy, you can reboot, use Repair mode, and run fixmbr. I don’t know whether FreeDOS comes with fixmbr, the website’s downright confusing. If you don’t have some sort of livecd with fixmbr, I recommend the ms-sys Ubuntu package. I’ve used it to remove Ubuntu and restore the Windows bootloader on two computers in the last week.

$ sudo ms-sys -m /dev/sda

Then reboot, use rEFIt to sync the GPT-MBR tables, and enjoy Mac OS X and Windows again. In the future, I’ll stick to virtual machines for Linux. Partitioning is not worth the trouble.