The Via Artigo was just too cute to pass up. The videos don't do its size justice. When I unpacked it, it was even smaller than I expected. I was looking for a system to replace my home web server, on which this blog is hosted.
By the time I put it all together, I was so impressed that I began to use it as my full desktop system. It consumes so little power that I can just leave it on all the time without feeling pangs of guilt.
Here are some notes about my experiences.
Cairo is the hot new cross platform graphics library. It is becoming very popular, because it solves two outstanding problems in a portable way:
- Path based drawing
- Antialiasing
Both of these problems are astoundingly hard. You would have to read a whole graphics textbook in order to implement basic drawing, and antialising. Before cairo, your choices were Win32 GDI based drawing, or whatever GTK uses. In addition, cairo is supported in Python.
The problem is that cairo has something that's not obvious for some people. A lot of users might write a program to draw a line and get this:
#!/usr/bin/python
import cairo
def drawLine( ctx, x1, y1, x2, y2 ):
ctx.move_to( x1, y1 )
ctx.line_to( x2, y2 )
ctx.set_line_width( 1.0 )
ctx.stroke()
surface = cairo.ImageSurface(cairo.FORMAT_RGB24, 32, 32)
ctx = cairo.Context( surface )
ctx.set_source_rgb( 1.0, 1.0, 1.0 )
drawLine( ctx, 2, 16, 30, 16 )
drawLine( ctx, 16, 2, 16, 30 )
surface.write_to_png( "out.png" )
(Magnified 4 times)
The lines are all fuzzy! Even Inkscape, an otherwise well-polished graphics program, has this naive implementation, and it frustrates users to no end, because all of their lines are fuzzy.
Recently on www.websequencediagrams.com, I noticed that I had a link from a Japanese web site. So I decided to check how my web application worked with Japanese. Of course it didn't work. So I had to figure out how php and python use unicode.
Examples
C:\>calc 5+5*5 30.000000 c:\>calc 0x30 48.000000 c:\>calc (123456 % 51)/12 3.000000
If you have to draw something called "UML Sequence Diagrams" for work or school, you already know that it can take hours to get a diagram to look right. Here's a web site that will save you some time:
You can just write the diagram out in text, click "Draw", and the web site will spit out an image. Then you can tell your boss that you slaved for hours in MS Visio perfecting every line...
I have created a separate web page for this project... please go there.
Download Installer
UMA and free long distance
Last time, I talked about the UMA technology used in some newer cell phones. Some of you might be thinking, these new cell phones work over the Internet. What's to stop me from travelling to another continent, and then making free long distance calls to local numbers back home?What's UMA?
Recently, many carriers have started offering UMA, or WiFi phones. These are cell phones with WiFi capabilites. Don't be fooled -- you won't be able to get free calls and run skype on them. The UMA technology is meant to extend the carrier's cellular network into your home using your broadband internet connection.How does UMA work?
An UMA phone operates just like a regular cell phone. It can talk to cellular base stations. But it is dual mode, and it also has a WiFi radio on board. When it finds a WiFi access point, it will attempt to connect to your carrier's servers over the Internet. If the connection is successful, it will "Rove in" and begin sending everything over the Internet.Go to http://gandolf.homelinux.org/~smhanov/todo/ to try it out.
Here's the php source code.
The challenge: Install Linux on a really old laptop. The catch: It has only 32 MB of RAM, no network ports, no CD-ROM, and the floppy drive makes creaking noises. Is it possible? Yes. Is it easy? No. Is is useful? Maybe...
Motivation
Why? Like mountain climbers say: because it's there. As an environmental nut, I don't like to throw away things that still work. But I have a PCMCIA network card and I would rather not have to hunt down and install 10 year old drivers to get it to work with Windows 95. The latest Linux definitely supports more hardware out of the box than Windows 95.The google show_ads.js script has been optimized for quick loading. Google has removed all whitespace, and renamed variables and funcitons to have single letter names. While this is good for fast page loading, it is not so good for understanding what it does. So I ran this through my Javascript PrettyPrinter, and then renamed the functions and some variables based on what I think they do.
- It handles HTML, embedded javascript and CSS
- It uses syntax highlighting for keywords and punctuation.
- It adds links to Javascript function calls so you can click on them to jump to their definition.
Many web sites today have rss feeds. RSS stands for "really simple syndication". Basically, it is a link to an ever-changing XML file with a list of articles. Even web sites like www.gocomics.com syndicate their content online, but what they include is pretty useless -- for each day, it's just the name of the comic and the date. Obviously, the content creators want you to visit their web sites and click on ads (and I encourage you to do so).
Technically inclined people (and their spouses) don't have to deal with these web sites, because now you can install this python script on your server. It will automatically scrape the latest comics from any web page you specify, and make them all available on a single page. All you have to do is come up with a regular expression for the filename of the comic.
- Shareware
- Adware
- Adsense
- Donations
You:

download WaveStudio.exe
In this article, I'll explain how you can get a stack trace for where your resource leaks occur.
This article was actually written in 2002. Here, I explain a technique for figuring out which words are in which phone numbers. Full C source code is included.
Recently, however, my views have changed after reading Scott Meyer's book, Effective C++. In Meyer's book, he goes through every feature of C++ and shows you how you have to program with extreme care to avoid undefined behaviour. It seems like every modern feature that C++ has was specifically designed to help you shoot yourself in the foot.
I never realized this before, because I simply never use these dangerous features. In this article, I'll show you how to program in C++ safely.
Allow me to correct this misinformation.