Friday, February 22, 2008

Why Deadwood requires 64-bit integers

Since I just got an email pointing out that my Deadwood code would be more portable if it didn't use 64-bit integers for the timestamp, I will explain why this is necessary:
  • 32-bit machines can handle 64-bit ints with most compilers. Indeed, the C99 standard mandates 64-bit int support.
  • The only 64-bit int used in Deadwood is for the timestamp.
  • I don't want to contribute to the Y2038 problem our children will have to deal with.
  • The file format used for storing the DNS cache to a file uses these 64-bit timestamps.
64-bit integer support is mandated by the C99 standard. It's been nine years; I don't think it's worth my time to make my program compatible with broken compilers that don't follow a 9-year-old standard.

Wednesday, February 20, 2008

Just letting people know there are two MaraDNS support emails sitting in my mailbox. I hope to have a chance to answer them in a day or two.

- Sam

Monday, February 18, 2008

ObHack and Dillo updated

Enhas has made some tweaks to ObHack, which can be looked at and downloaded here

I swore off making updates to Dillo last week; however I changed my mind. I have cleaned up the crude utf8-to-latin1 conversion used by my version of Dillo so that it works for most latin1 characters represented in UTF-8; I have also added basic support for the names of the suits in cards (The " Clubs" symbol becomes a " C" and so on).

In addition, I have removed that annoying Bug Meter; I use Dillo for basic web surfing, and I' m not one of those people who gets a smug feeling knowing a given page has 53 or however many errors in its HTML. If you want it back, just define BUG_METER when compiling my version of Dillo.

My version of Dillo can be downloaded here (750k .tar.bz2 tarball). It works pretty well; I using it right now to post this blog.

- Sam

Friday, February 15, 2008

ObHack snapshot update

Enhas has contributed some bug fixes and other changes to ObHack, which I have just put together in to today's snapshot, available here.

Have a good weekend everyone!

- Sam

Thursday, February 14, 2008

OK, here are my ugly hacks to Dillo-i18n

The ugly hacked version of Dillo-i18n that I hacked together so I would have usable accent support in my mini-Linux distribution can be downloaded here. Note that the code is ugly. For example, the utf8-to-latin1 code is basically broken; it makes certain Unicode quotation marks more barable, but does not correctly convert Spanish accents from utf-8 to Latin 1. Looking at the code, I can see what I did wrong and could even fix it if I were so inclined, but I'm not.

The purpose of this version of Dillo is to have a simple web browser that is usable for my main tasks (Reading and writing email with Gmail; publishing blog entries); since Gmail doesn't use utf-8 for accents when the HTTP "accept charset" specifies to use Latin-1 (you would be amazed how many web sites ignore the accept charset, such as Myspace and the Wikipedia), this bug isn't important enough for me to fix.

Also, the mini-CD also includes the graphical version of Links from Twilight labs, which completely correctly supports accents (but, alas, doesn't allow me to write emails with accents).

I actually almost never use this mini-CD; I have to lug around my laptop for my job, so use that to access the internet; the CD is only used for my afternoon and evening meditations. Even if I did use it more, not having Firefox saves me from having to update the CD every month or so.

Also, it's possible to use a file on a USB memory stick as the root filesystem; this allows me to have a larger file than is possible with a business card CD, complete with multiple updated web browsers (Firefox, Konqueror, a Webkit browser, a flash player, etc). So, this mini-image will only be used when I don't have that file on a USB memory stick.

Anyway, I'm done with MOAM-CD. It was an interesting experiment in how little I could make a basic web browsing system. With my increased work hours, I usually have my laptop with me, and don't often need to use this mini-system to get online. It's still useful for cyber-cafe use when I'm downtown on the weekends, and the occasional day when I don't have my laptop, but, in truth, trying to keep it updated is a real pain; the Firefox security updates often times break more stuff than they fix. It took me two or three days to hack Dillo to have usable accent support, time I could have spent relaxing, translating documents, or with my friends.

So, barring my life getting boring again or a critical security hole, I will not update MOAM CD again. It was a fun project.

Wednesday, February 13, 2008

Yay! I got Dillo to completely work in my Mini-CD distribution

MOAM-CD is a project I have been working at on and off for a while. I realized recently that I don' t use MOAM-CD that much any more, so my efforts here have been making a version of MOAM-CD that I can burn and forget about. Also, since I use the .mp3 files on the CD for meditating, I wanted to be able to add more songs.

Hence, I have gotten rid of security-hole-of-the-month-club Firefox, and am now using a slightly hacked version of the latest i18n version of Dillo. Ironically, the i18n part of this version was broken, but it has other cool features the last (and probably final) 2006 stock release of Dillo doesn' t have, such as tabs, and the ability to actually use Gmail to read and send mail.

The i18n part was broken; I got rid of all of the iconv-using code and replaced it with a very basic UTF-8 ro Latin-1 converting code that won' t convert text that is already Latin-1. I also changed the HTTP code to not send an " Accept charset" of UTF-8, but send iso 8859-1 instead. And Dillo is run in a wrapper script that sets the environmental variable LANG to " es_MX" (Mexican Spanish) before running Dillo.

Once I did all this, everything worked like a dream for the two languages I speak: English and Spanish. I can not only see all of the accents correctly on web pages, I can also write and send emails that have accents in them.

In addition, there is some hackey code that converts UTF-8 quotes in to ASCII quotes, so I can read pages that use those ugly quotes, such as the WEB Bible.

So now, I have an image that I will burn in a day or two (I' m testing it with a burned CD-RW) that has a web browser I don' t need to update every month, and that I can use for using Gmail and posting blogs.

And, if I do need Firefox, I have changed things so the CD can use a file on a USB memory stick as the root filesystem, allowing me to update Firefox without needing to burn a new CD. So, I get the best of both worlds.

OK, I' ve been obsessed with Dillo for too long (two or three days). Time to go home, text my friends, and rest.

I hope to post some files in a day or two.

Monday, February 11, 2008

ObHack snapshot update

I did a lot of work on ObHack this weekend. Mainly, I have completely revamped the Heretic theme.

Previously, ObHack had only one there for Heretic: A castle theme. I felt kinda silly being in a castle in E2 (Hell's Maw), so I finally fixed things so Hell's Mall looks like Hell, The Domes (E3) are quite as castle-looking as E1, E4 has a very sandy, Egyptian look, and E5 has a garish surrealistic.

If only one episode is made, a theme from E1 to E4 is randomly chosen (E5 is a little far-out to have as the only theme in a game)

I have also made some changes to the pop-down menu: It's now possible to have "rare" outdoors, that isn't 100% indoors, but has less outdoors than "some" outdoors. In addition, there are two new game types: Deathmatch without exits and a menu selection for Capture the Flag (CTF).

Note that CTF isn't supported yet; selecting CTF just makes normal deathmatch maps. However, this allows someone interested in CTF to add support for CTF to ObHack's scripts.

It can be downloaded here

(Geek note: I'm seeing if it's possible to post to Blogger using Dillo)

Thursday, February 7, 2008

MaraDNS snapshot update; ObHack snapshot update

Jean-Jacques Sarton has made some minor changes to improve cross-platform compatibility in today's snapshot of MaraDNS.

Enhas has made some minor revisions to today's snapshot of ObHack.

- Sam

Monday, February 4, 2008

MaraDNS snapshot update

In today's update, J.J. Sarton has completely re-written the code that builds MaraDNS. Hopefully, this will make things easier to package (the pkgsrc thingy, in particular, doesn't like MaraDNS' old build process)

It can be downloaded here