Bash Boggle – A Boggle Solver Written in Bash!

Bash is my favorite computer language. I also love writing programs to help human problems.

Inspired by this online Boggle solver, I decided to write my own solver while my friends were too busy playing the game and having fun :)

If you would like to test my work, here is the code:

http://dev.xkyle.com/bashboggle/

You will need the linux “words” dictionary, which is installable on Ubuntu by running “sudo apt-get install wamerican”

Why Bash? Yea it is not as fast as C, not as terse as Perl, not as elegant as Python, bla bla bla. But Bash is Fun, and it is good to keep the skills sharp. I think I will port it to python next just for the practice.

Here is an example input and output:

kyle@kyle:~/Projects/bashboggle$ cat board.txt
E    I    D    A    N
I    G    S    S    H
R    R    Qu   D    L
A    Y    T    E    T
I    A    O    A    E
kyle@kyle:~/Projects/bashboggle$ ./boggle.sh board.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
arty
dash
delta
digs
diss
eels
girt
girted
gray
hassle
hassled
rigid
rigs
sans
sash
shad
shads
sled
sleds
sleet
teaed
teat
teed
tels
toed
tray
trig

The board format is pretty flexible. As long as there is some sort of whitespace in between the letters, it will work. It is also case insensitive. For test boggle problems I used this online Boggle site.

Computer Assisted Jenga with the Wii Balance Board and Linux

I like to think about how games work, in the case of Jenga, it is just physics!

But don’t you wish you could peel back reality and see what is happening with the physics from the inside? Well now you can, with the help of a Wii Balance Board.

For the setup you need these ingredients:

  • Wii Balance Board
  • Computer with Bluetooth
  • Linux, preferably Ubuntu
  • Jenga Set, alternatively “Tension Tower
  • Some know-how to compile a trunk version of Cwiid
  • Some other python stuff (see the build instructions for details)
  • And my code

I’m going to maintain all instructions on how to setup all the technical details on my wiki: http://wiki.xkyle.com/WiiJenga

Once you have it setup, you can see where the real center of balance is of your game, and you can tell how close it is to toppling over.

In reality, the balance board isn’t quite sensitive enough to very accurately detect the center of balance of the Jenga blocks, or detect how many Jenga blocks there are, but it is fun to watch:

The Seagate Dockstar: A Very Cool Linux Device

What if I told you there was a computer out there, a small one, with gigabit ethernet, 4 USB 2.0 ports, runs on 5 watts, and serves as a great NAS (network attached storage) for your home.  It can share files, serve media, be a router, make backups for you, host a lamp stack, be a mail server, etc. It can do whatever you can think up.

How much would you pay for such a neat little device? $100? $120? What if I told you that this device is ~$35. What a deal. Lose your P4 electricity guzzler and stick this on your shelf with some harddrives plugged into it.

Now the next question, what Linux distro should we use, and how does one go about installing it? After all, there is no keyboard ports, no display, no cdrom drive. No problem.

To hack this thing, all you need to do is connect to its internal serial port. Here are some instructions to hook up a serial port to the Seagate Dockstar.

Now, there are lots of distros, not too many that support the ARM processor. The stock OS is indeed Ubuntu 9.04, however my OS of choice for this hardware is OpenWRT. Openwrt is a very light, simple, linux distro, designed for embedded systems and routers.  If you wish to follow my steps, here are some instructions on installing Openwrt on a Dockstar. I plan to buy a bunch of these and build some sort of super cheap SAN. I’ll let you know where it goes. The possibilities are only bounded by your imagination. (And I guess maybe the hardware)

Setting Up Your Very Own PXE Server!

Ever fumbled around your house looking for a Linux CD, but you can’t find it? Ever suspected that your ram was going bad, but you didn’t have a way to test it? Ever needed to backup files on a computer that had a dead and broken operating system? A solution to all these problems is a super cool tool called PXE booting. PXE booting allows you to load alternative operating systems over the network, without the need for cds, cdroms, etc!

Things you can do with a PXE server

Things you can do with a PXE server

Sound like something that you could benefit from? Setting up your own PXE boot environment is easy and Fun! Check out my presentation and then later my wiki page for notes, commands, and configuration snippets to get your own setup going.

ISPs Should Capitalize on their Reverse DNS!

Actually… no they shouldn’t. Here is what it would look like:

                                           My traceroute  [v0.75]
kyle (0.0.0.0)                                                              Tue May 18 15:14:52 2010
Keys:  Help   Display mode   Restart statistics   Order of fields   quit

 Host                                                           Loss%    Snt  Last  Avg  Best  Wrst StDev
 1. 192.168.0.1                                                 0.0%     10   12.0  15.6  11.3  33.6   6.7
 2  UPGRADE-YOUR-CONNECTION-1800-COMCAST.res.comcast.net        0.0%     10   13.1  15.8  11.5  31.1   5.9
 3. TURBOBOOST-UP-TO-50MBS.car1.Den.core.comcast.net            44.4%    10   15.3  17.7  11.8  23.1   4.5
 4. LIKE-WHAT-YOU-SEE?-GET-WITH-LEVEL3!.Level3.net              0.0%     10   27.5  22.5  12.5  43.5   9.0
 5. v----LEVEL3-EATS-SAVVISs-PACKETS.Level3.net                 0.0%     10   43.6  35.9  29.7  43.6   5.7
 6. ^----SUCK-IT-L3.das3-v3037.ch3.savvis.net                   50.0%    10   31.2  32.1  30.8  34.5   1.5
 7. FOR-A-GOOD-PING-TIME-CALL-888-638-6771.dallas3.savvis.net   0.0%     9    28.8  31.8  28.8  43.5   4.8
 8. We-heart-savvis.dllstx0.us.bb.gin.ntt.net                   0.0%     9    30.1  33.1  29.4  51.5   7.0
 9. 4.2.2.2......jk..25.209.2.4                                 0.0%     9    70.3  83.1  68.1 186.6  38.9
10. 0.0.0.zero                                                  0.0%     9    51.6  58.0  51.6  72.9   8.0
11. nothing.here.move.along.                                    0.0%     9    55.4  55.1  51.7  62.1   3.5
12. THIS-SPACE-FOR-RENT!!!                                      0.0%     9    86.3  87.4  83.7  91.3   2.7
13. the-real-site.net                                           0.0%     9    103.9 105.9  84.0 128.2  12.0