Posted by Jim Morris
on Wed Oct 21 01:32:16 -0700 2009
Around 10 years ago I was playing with some home robotics, built a
simple robot, with some sensors and an on-board Linux-based PC. The
purpose was to experiment with Robot AI, a continuation of my PhD
thesis I started on some 30 years ago, but did not complete.
The robot had a camera, a digital compass, a sonar scanner and a short
range IR range detector, plus some bump detectors. I could control
it over a wifi connection, that was a Orinoco PCMCIA board plugged
into the PC104, 586 based Linux PC that was on-board. All powered by
several batteries.
... Show more ...
Posted in
Linux,Embedded
|
Tags
linux,pc104,wpa_supplicant,microdrive
|
no comments
Posted by Jim Morris
on Sat Sep 12 16:07:22 -0700 2009
In the process of rewriting my voice server in
Erlang,
I decided a new web-based Javascript UI would also be welcome. One problem of
course is my voice server requires a TCP connection and a UDP socket
for sending voice, not to mention the whole voice capture, playback
thing.
In order for this to work the voice and playback would need to be
written in a Java Applet, so it made sense to put the whole TCP/UDP
communications stuff in there too.
... Show more ...
Posted in
Java,Javascript
|
Tags
java,javascript,applet
|
no comments
Posted by Jim Morris
on Sat May 02 00:09:36 -0700 2009
Background
I've been using cucumber to do all my integration testing. Usually
testing over the wire to a live system, regardless of what the target
system is written in (Ruby Rails, Merb, Java etc).
... Show more ...
Posted in
Erlang,Cucumber
|
Tags
erlang,cucumber,bdd
|
7 comments
Posted by Jim Morris
on Mon Apr 13 01:11:57 -0700 2009
In Erlang they have a very neat way of reading TCP packets that have a
header that specifies how big the following packet is. So long as you
send that header as a big-endian integer, you can use the built-in
mechanism. Then gen_tcp, takes care of making sure the entire packet
is read before passing it onto you.
Here is an example of a simple server getting packets from a client
using some simple binary protocol... For instance sending this binary
packet,
... Show more ...
Posted in
Erlang
|
Tags
erlang,gen_tcp
|
2 comments
Posted by Jim Morris
on Sun Apr 12 16:56:50 -0700 2009
Background
I recently undertook a project to rewrite a voice conference server I
wrote over 10 years ago. This server was written in C++ running on a
Windows Server (originally NT and then win2k). The reason it was
written for win2k was to use
I/O Completion Ports
which were not (and still are not) available on Linux.
Solaris has an equivalent AIO feature but not quite the same. I/O
Completion Ports make very efficient use of multiple CPU's, and the
conference server had to be very fast and handle a large number of
concurrent connections.
... Show more ...
Posted in
Erlang
|
Tags
erlang,jinterface
|
5 comments
Posted by Jim Morris
on Sun Apr 12 01:26:06 -0700 2009
I haven't blogged much about Java even though it is my primary
programming language. Since I have been doing a lot of Java recently I
thought I'd post something about some of the Java idioms I've used
over the years.
One I have been using a lot recently is a command dispatcher where the
command is text.
... Show more ...
Posted in
Java
|
Tags
java,enum,dispatcher
|
no comments
Posted by Jim Morris
on Fri Feb 06 15:04:54 -0800 2009
There is a raging debate in many forums about how to do fixture-like
things. Basically how do you populate a database with test data so you
can run your Specs/Tests/Features.
There are several libraries out there to do this like FactoryGirl,
FixtureReplacement, Machinist, Fixjour etc etc. If you use Rails and
ActiveRecord pick the one you like and be happy ;)
... Show more ...
Posted in
Rails,Merb,Sequel
|
Tags
merb,sequel,fixtures
|
1 comments
Posted by Jim Morris
on Tue Jan 13 23:33:26 -0800 2009
I just replaced the blog engine I was using (an older version of Typo) with a custom one I just wrote in Merb. It should look identical to the old typo based blog, as I used the same theme.
Hopefully I imported the data correctly so all old article url's that are scattered all over will still bring up the correct article and the RSS feeds should continue to work.
... Show more ...
Posted in
Ruby,Merb
|
Tags
merb,sequel
|
3 comments
Posted by Jim Morris
on Wed Aug 27 14:46:34 -0700 2008
Background
I was getting bored waiting for Trolltech to release the next version
of Qtopia for the Freerunner, so I ported the xgps client from gpsd's
distribution to Qtopia.
As you may know by now, Qtopia does not have X11 so none of the
existing X11 based or GTK based GPS clients work. I was exploring GPSD
because I wanted to to be able to get a one time position for my sunset
calculator which requires your current latitude and longitude.
Although GPSD is not well suited for that (thats a whole other blog
entry), I did notice you can connect to it over the ethernet, so I was
playing with cgps and xgps that you find in the GPSD tar file, running
on my desktop, talking to gpsd running on my Freerunner.
... Show more ...
Posted in
Openmoko
|
Tags
openmoko,freerunner,gps
|
32 comments
Posted by Jim Morris
on Sun Aug 10 23:09:54 -0700 2008
I finally got around to building ruby 1.8.6 for my FR. I modified the
ruby bitbake files that I found in the Mokomakefile openembedded
directory. I am not sure how one actually is meant to do this, as the
OE site is down and the docs don't explain it. So I just replaced the
1.8.5 ones with the 1.8.6 ones. I also managed to fix a bug in the
1.8.5 BB recipe that was causing socket to not build.
I also got the ruby dbus library to work, although I don't know what to
do with it yet :)
... Show more ...
Posted in
Openmoko
|
Tags
ruby,freerunner
|
3 comments