Blog

Red & White – Interesting Coincidence??

Have you ever noticed that wine is usually either red wine or white wine.
And that blood cells are either red blood cells or white blood cells?

Mar 14:23-4 “Then He took the cup, and when He had given thanks He gave it to them, and they all drank from it. And He said to them, “This is My blood of the new covenant, which is shed for many.”

Poptray Subject Fix Proposal

The following is a post I made to the Poptray user/developer forum message board on August 20, 2008. I am archiving a copy of my message on my blog as well for historical purposes.

I have taken a look at the source code for PopTray and the RFC spec on email headers, and I believe the subject encoding problem is one that could easily be resolved without waiting for Indy components to do character set conversion. (I don’t actually have a Delphi compiler set up to write and test a patch, but here’s an outline of the proposal for a solution I’ve come up with so far:

In uMain.pas, there is a procedure ShowMailMessage(…). In particular, on line 1295, there is a line:
SubItems.Add(Accounts[num-1].Mail[i].Subject);
I believe at this point you need to “translate” the subject. The subject is interpreted by the Indy components as Ansi, which is correct based on the email header RFC. However, there’s some stuff that was added as an after-thought for how to accomodate international subjects in headers that only ascii is allowed in. So we can “undo” or fix the subject line at this point.
Maybe that line becomes:
SubItems.Add(FixEncoding(Accounts[num-1].Mail[i].Subject));
and you add a new procedure FixEncoding(subject:string) : string
that will “fix” the subject encoding into something more human readable.

According to the RFC, the format for specifying a non-ansi subject is:
“=?” charset “?” encoding “?” encoded-text “?=”
This should be simple enough format to tokenize using standard string tokenizing libraries. if the string does not follow this pattern, return the string as is. Otherwise, we have to process it and fix its encoding.

Encoding is either “Q” for Quoted-Printable or “B” for Base64. Those are the only two options, so not too complicated there, other than locating or creating a library function to decode those two encodings. Base64 allows for longer subjects with foriegn characters, but its not human readable, whereas quoted printable only changes spaces and non-ascii characters using escape codes. I haven’t researched this yet, but I would imagine a library or example code for how to decode Base64 and Quoted-Printable back to “normal text” is not difficult to find.

Charset slightly more complicated, in that there’s a larger list of choices that are possible. I don’t know how good Delphi’s built in support for doing charset conversion is, I’ve only done them in C++ and Java. In C++ everything had to be converted to Unicode instead of UTF-8 and displayed as “wide strings” which is a little weird at first, but doable, though it required a few format strings with %S conversions to change from ansi-unicode and vice versa. In Java its as simple as passing the string and a string with its encoding to a special library function and it auto-magically swaps the encoding. But if its particularly complicated, even just adding support for the most common one, UTF-8, would very much benefit users of pop-tray. UTF-8 to Unicode is a relatively simple conversion even if you have to code it manully. Getting the list component to display wide strings rather than ansi strings may be automatic, or might require a minor change somewhere, not sure.

I hope that is helpful! I’d be happy to discuss implementing this feature farther or do some more research if one of these steps turns out to be a hang-up…its a feature I’d very much like to see!

Mystery Solved

So that thing with my computer waking up?

Shortly before I started having the problem, on Wednesday, my new TV-tuner USB device arrived. On my lunch hour I was hooking it up and trying to get it configured. Windows Media Center is really difficult to configure despite the great lengths they went to in order to try to make it “user friendly” and nagivatable with a TV remote control.

To change the input source from coax (cable) in to RCA jack input, something I might want to do frequently, you have to re-run the entire “configure your tv tuner” setup including programming the remote and checking for updates online.

There’s also this setting about “automatically updating programming guide” which has the undocumented feature of waking the computer up from hibernate to do so at a non-configurable scheduled time, and not putting the computer back to sleep after. Aha. So now Windows Media Center is set to only download manually…and it didn’t wake up on me this morning.

Mysteries

The last two days in a row, my computer has come out of hibernate and woken itself up sometime between when I fell asleep and when I woke up in the morning. I woke up to computer fan humming and the computer sitting at the login screen in screen saver. No idea what the cause is.

“Giant” King Of of Bashan, Thou = Familiar

1) Something jumped out at me when I was reading the other day. Deu. 3:11 mentions the size of the bed of a giant (King Of of Bashan) as being “…4 cubits in width according to the standard [or common] cubit”. Why add this whole clause “according to the standard cubit” unless this isn’t the cubit they usually used (royal cubits?) Previously I’d done a little
preliminary research on the cubit and which cubit length would Moses have measured the tabernacle in, seeing good arguments for the length being in royal cubits. I’d like to investigate this anomaly usage of cubit further, but this little gem seems to be one more piece of evidence in favor of that argument. And evidence that the enemy king’s bed was slightly smaller than it sounds ;-).

2) Thou. I was reading up on some biblical Greek grammar stuff, and came across an explanation of why “you” is the same for singular and plural in English. Basically, English *used to* have different conjugations for the two, thou art for the singular, and you are for the plural. Using the plural address (you are) was also occasionally used as a polite/formal version for the singular, and the singular (thou art) was considered more
intimate/informal. Over time the singular informal was replaced with the
formal or plural usage (hence why it is you are not you is). Understanding
this makes it so much more clear why old hymns are so chock full of
vocabulary that sounds antiquated or colloquial today. Why would a hymn say “thou art strong ” rather than “you are strong”? Because it was
emphasizing the familiar intimate relationship we have with God. To someone from that era, a modern worship song that uses you eg “you are my all in all” would sound like God is formal and distant, not accurately representing the character of God.

Geek LoL of the Day

“Building log4cpp with MSVC++ 5 is not supported and will not be, unless someone can find a way to do so without mutilating the source code.”

VNC

If VNC is normally “a bit slow”, doing VNC to a machine in Australia? Very slow…

Science Vs. The Bible

Last night I watched a History Channel movie called “Decoding the Exodus”. The whole idea was that a film-maker/investigative-reporter tried to research whether or not the whole story in Exodus could be scientifically plausible or not. So most of the movie was basically him presenting scientific research on how science could account for causing all ten of the plagues and the crossing of the red sea and artifact evidence in Egypt, Greece, and the middle east that corroborates the incidence of this event.
Basically, a volcanic earthquake storm off the coast of Greece in the 1500s BC is what the movie proposes triggered the event. He had interesting ways of supporting his case, such as scientific evidence of events more recent in history where similar things happened. Like a volcano spewing out ice and fire together, and citing a lake in Cameroon that turned blood red due to an underground (naturally caused) gas leak in 1986 and how all these crazy things happened near that lake in Cameroon that were similar to several of the plagues (such as people living nearby breaking out in boils and sores, and people and animals dying from a poisonous vapor that resulted). Basically, he had a scientific explanation for every part of the story, and a lot of historical artifacts including writings in stone that corroborate the events from different perspectives. Of course, I can’t say I read hieroglyphics to agree or disagree with his renderings or have been to these sites to really verify these caves “filled with ancient hebrew carvings” are really where he says they are and so forth. But if I needed some confirmation that it is *plausible* that the events of the Exodus could have happened, its really interesting to hear from someone who did some thorough research what scientific and archaeological evidence supports the idea that the events weren’t just mythology, but historical events.

Mike Macintosh on Spiritual Fruit (Jn. 15:1-8)

Many people have “plastic fruit” in their lives. It has the appearances of fruit…but it doesn’t taste like it.
Application: Do you have real spiritual fruit in your life? Or just look like you have spiritual fruit?

The kind of fruit God is looking for is the kind that is inside us.

A true vine implies there’s a false vine.

To abide takes purity.

Flash Mob In the Conference Room @10:30am sharp

Its kind of funny to watch everyone to at exactly 10:30 (not 10:29 or 10:31) get up from their desks to walk into the conference room for the staff meeting.