The READIN Family Album
Me and Sylvia, smiling for the camera (August 2005)

READIN

Jeremy's journal

Language speaks, because speaking is its pleasure and it can do nothing else.

Penelope Fitzgerald


(This is a page from my archives)
Front page
Most recent posts about Programming Projects
More posts about Projects

Archives index
Subscribe to RSS

This page renders best in Firefox (or Safari, or Chrome)

Saturday, March 13th, 2010

🦋 Character sets

At work, I've been involved in a project to support the full Unicode character set in a more-than-cursory way*, getting to understand wide characters and utf-8 much more fully than I ever did before; and finally I am thinking I want to encode READIN in utf-8. All this time it has been in ISO-8859-1, which works ok as long as I escape unsupported Unicode characters; but it seems like time to get with the program.

My question is, what's the easiest way to convert my data? A lot of posts have got characters like äöüæ... which are going to show up as garbage if I just change the encoding of the blog. I was thinking I would use mysqldump and use iconv to convert the data. But somehow the output from mysqldump is already encoded with utf8. Does this mean I can just rebuild the database from this output and I'll be good to go? I'm a little confused why mysqldump is not respecting the encoding in the database...

Well, restoring from the output of mysql-dump does not have the desired effect; characters that were ISO-8859-1 in the original db, that were UTF-8 in the dump, are converted back to ISO-8859-1 in the restore.

After further investigation, it seems like my original idea will work: although it looks to me like iconv is essentially double-encoding the characters that were transformed to utf-8 by mysqldump, when I load them back into mysql I get utf-8 characters. Not totally comfortable with this yet...

* (Previously our support for Unicode had consisted of walking through utf-8 strings looking for high-order characters we recognized, and flattening them to 7-bit ASCII.)

posted morning of March 13th, 2010: Respond
➳ More posts about The site

Sunday, November first, 2009

🦋 Where do you come from?

I kind of enjoy watching the Google referrals that float by on the right-hand side of the blog under "Where You Came From" -- idly tracking the number of searches that are likely for something that would appear on the page they accessed (ibant obscuri sola sub nocte per umbram) versus words that seem no more related to what I've published here than they would to a page chosen at random from the web (+"dolly parton" ​+sneezed). Here are some popular queries over the last few months:

  • 13 views: q=what+do+hobbits+look+like
  • 14 q=stroszek+soundtrack
  • 16 q=movies+about+outcasts
  • 17 q=museum+of+innocence
  • 20 q=el+libro+talonario+translation
  • 20 q=of+love+and+other+demons+analysis
  • 22 q=codex+seraphinianus+download
  • 31 q=the+hamlet+faulkner
  • 33 q=readin
  • 39 q=gordita+beach

posted evening of November first, 2009: Respond
➳ More posts about Projects

Thursday, August 20th, 2009

🦋 errno

Perhaps you are a programmer; perhaps you use gdb to step through the programs you have written, looking for bugs; perhaps you have wondered why gdb will not let you examine the contents of the errno variable. Here's the deal: if you are typing print errno and getting the message Cannot access memory at address 0x8, it is because errno is not an actual variable; the compiler has replaced references to errno with *__errno_location() --

print *__errno_location()
will give you what you're looking for.

posted morning of August 20th, 2009: 5 responses
➳ More posts about Programming

Friday, April 24th, 2009

🦋 (Relatively) Close to the metal

Neat-o, I found a new tool for testing stuff out! It is called netcat and it is essentially what I've always wished telnet would be. You can basically open up a socket and listen as the server or attach as a client, and see all the traffic from the other party, and type in the traffic from your side. Be sure to read the (brief) man page as the tutorial pages I've found on the web this morning all omit important information and leave you scratching your head as to what is going wrong.

The two things (at first glance) that nc has over telnet: primary point is that you can listen on a port, and thus emulate a server; telnet does not do this at all. Secondary advantage, the whole thing is much cleaner and simpler, and easier to run as a batch job; you don't have to learn escape characters or anything like that. Drawback is that error reporting is pretty minimal; but I can live with that.

posted morning of April 24th, 2009: Respond

Tuesday, March 10th, 2009

🦋 Vacation...

Hm, this is looking like a quiet time for the site. I'm not sure why exactly. But I think I will take a couple of days off.

posted morning of March 10th, 2009: Respond

Friday, February 13th, 2009

🦋 Do you read READIN?

I seem to have picked up several new readers in the last couple of weeks, bringing my total to the high single digits or low double digits. If you have recently started reading the site, and you don't mind if I know about it, please leave a comment on this post or at the Guestbook -- I'd love to know who I'm writing to. If you prefer to remain anonymous, no worries, disregard this post -- I understand that impulse as well.

(A brief rundown of this blog's history, from last spring, in case that interests you. Kind of dull frankly.)

posted morning of February 13th, 2009: 2 responses

Saturday, January 31st, 2009

🦋 Blogroll Amnesty Day

Here is a nice idea from Jon Swift: time to add a couple of blogs I've been reading and liking but not linking to. (Swift says "link to some smaller blogs that you've been reading"; I take this to mean "smaller than your site", which would be just about impossible for me. So I'm going to publish links to a couple of sites I'm reading, irrespective of their size.)

Enjoy!

posted afternoon of January 31st, 2009: 2 responses

Saturday, January 10th, 2009

🦋 Dream Blogging

An anxiety dream last night about the code I am maintaining: a customer reported a bug, which on analysis proved to be a corruption in shared memory caused by the customer's input. When a year was specified in the date parameter, the corruption would occur -- if only month and day were specified, everything was ok. It was pretty mysterious how this would not have been discovered years ago as the section of code governing this parameter had not been modified in a long time; but the bug was pretty easy to track down and fix. Except, a little later I was talking to my boss and he thought I had told him the bug was not fixable and we would have to find a workaround. I was going crazy trying to figure out how to respond to this because I had forgotten where I had put the fix in and I had not commented it or kept any records...

Later in the night, I dreamed I was examining and modifying the source code for my dreams. It was not clear how or whether I would be able to recompile and distribute the fixes to my consciousness.

posted morning of January 10th, 2009: Respond
➳ More posts about Dreams

Friday, January second, 2009

🦋 Fixing my RSS

I've modified my RSS feed-builder to include (almost) the full text of posts, with HTML formatting (mostly) intact. I have been slow getting up to speed with RSS but this should make the site much more conveniently readable for those of you who access it that way. Readers should now show, for each post: all text, including all formatting tags; a link to comment on the post, and if there are any comments, a counter; links for any category tags associated with the post. Readers will not show any graphics or multimedia, and will not have the CSS formatting that's in the blog.

posted evening of January second, 2009: 3 responses

Tuesday, November 25th, 2008

🦋 O Excellent New Tool!

You know what debugging tool I just hate having to deal with? Purify, is what. Its interface seems insanely cumbersome to me, it's hard to use in conjunction with gdb, I dislike having to compile a separate version for heap-checking. Well today, my co-worker Nick hipped me to valgrind, which just seems like it was made for me. Exactly suited to my style of debugging. Basically it just spits out a ton of messages to stderr, interspersed with your own stderr output you can troubleshoot very quickly and come up with a bug location to reproduce in gdb.

My goal is to become a power user of valgrind -- starting with no knowledge of the product I was quickly able to isolate the problem I was seeing. If I acquaint myself with it's features it's going to make a really valuable addition to the toolchest.

posted evening of November 25th, 2008: Respond

Previous posts about Programming Projects
Archives

Drop me a line! or, sign my Guestbook.
    •
Check out Ellen's writing at Patch.com.

What's of interest:

(Other links of interest at my Google+ page. It's recommended!)

Where to go from here...

Friends and Family
Programming
Texts
Music
Woodworking
Comix
Blogs
South Orange
readincategory