Perseus Installation Directions

June 5th, 2009 by pjungwir

I managed to get Perseus up and running on my Macbook Pro with OS X 10.4. Everything appears to work except dictionary and morphology lookups. If I get those working, I’ll post how here. In the meantime, I thought I’d post my process for getting the rest of it working, especially since other people seem to have encountered so many problems. For the most part, I followed the instructions in the INSTALLWITHDATA.html file. Any divergences from that file are noted below.

For clarity, I begin all Perseus paths and filenames with the sgml directory. So of course they are relative to wherever you put that directory. In my case, it is at /Users/paul/local/perseus/sgml. Relative paths for MySQL, Apache, and Tomcat are relative to their own installation directories, in my case /usr/local/mysql, /www, and ~/local/java/tomcat. All ant scripts are run from Perseus’ sgml/reading directory.

Installing MySQL

I put MySQL in /usr/local/mysql. This was complicated for me because I had to upgrade from MySQL 4 while supporting an existing installation of MediaWiki, but it should be easy enough for others. I just moved my old installation aside, installed MySQL 5, and then copied my data directory into the new location. Since there is no my.cnf file initially, I used support-files/my-medium.cnf as a starting point.

I’m not sure why Perseus wants this line in the config file about InnoDB tables, because all the tables created in the sql scripts are MyISAM:

innodb_data_file_path = ibdata1:500M


Oh well. It was an inconvenience for me, because I already had an ibdata1 file for MediaWiki’s InnoDB tables, and since it wasn’t 500M, MySQL refused to engage the InnoDB engine upon startup. When I hit MediaWiki, I get errors about the InnoDB engine not being found. You can tell if you have this problem by checking the .err file in your data directory. You’ll see lines like this:

InnoDB: Error: data file /usr/local/mysql/data/ibdata1 is of a different size
InnoDB: 1152 pages (rounded down to MB)
InnoDB: than specified in the .cnf file 32000 pages!
InnoDB: Could not open or create data files.
InnoDB: If you tried to add new data files, and it failed here,
InnoDB: you should now edit innodb_data_file_path in my.cnf back
InnoDB: to what it was, and remove the new ibdata files InnoDB created
InnoDB: in this failed attempt. InnoDB only wrote those files full of
InnoDB: zeros, but did not yet use them in any way. But be careful: do not
InnoDB: remove old data files which contain your precious data!
090528 17:27:46 [ERROR] Plugin 'InnoDB' init function returned error.
090528 17:27:46 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.


I fixed this by calculating that there are 64 pages per MB, so I changed the config line to this:

innodb_data_file_path = ibdata1:18M:autoextend


But I guess this tangential to Perseus. If you aren’t running any InnoDB tables in prior databases, the standard config line should be harmless.

By default, Perseus uses to make your database username/password be webuser/webuser. That is a rather uninformative username, especially if your database hosts several apps. Anything with a web interface could potentially be webuser; it’s better to use descriptive names like addressbook and budget and library. So I changed the Perseus database user to perseus. According to the installation directions, this is okay as long as you put the correct values in properties/hopper.properties, altering these lines:

hopper.database.username=webuser
hopper.database.password=webuser


This is not quite true. You do have to change those lines, but you should also change all instances of webuser in these files, too:

jsp/META-INF/context.xml
src/perseus/util/HibernateUtil.java


I suspect the latter may not actually be necessary, but I did it anyway just to be safe.

I loaded the SQL files per the README instructions. There are a whole lot of SQL files to download for this step. I couldn’t find a single .tar or file with them all together. I don't know why this is missing.

Installing Apache

I couldn’t get Apache 2.2.9, 10, or 11 to compile with shared libraries. You can see my bug report here. Apache 2.2.8 worked, so I used that. My configure line was:

./configure --prefix=/www --enable-proxy=shared --enable-rewrite=shared --enable-ssl --enable-dav


Before running configure, I also made some source code changes to srclib/apr/network_io/unix/sendrecv.c, as described here (Macs only). I’m not sure if these are really necessary, but I did it just to be safe.

My Perseus installation is private, just running on my laptop, but if you’re planning to make yours public, you may want to work harder at getting 2.2.11 to work, so you have the latest security updates. I also built and installed PHP 5.2.6, again for non-Perseus use.

The directions from Perseus seem to assume that Apache serves nothing but Perseus. This is not my case, so I had to do things a little differently. Basically, Apache needs a cue somewhere within the URL indicating when a request belongs to Perseus. You can place this in the hostname portion using name-based virtual hosts (recommended), or you can place it in the directory portion using Apache’s Alias command. I went the former route.

First, I added perseus as an alternate hostname for my machine, by editing the /etc/hosts file, like so:

127.0.0.1	localhost perseus


This will let me type just perseus into my browser, and I’ll go straight to my local installation. A shortcut like this is really only suitable for private installations like my own. To get a similar effect on a LAN, you should do it with DNS records. Or you could forget this syntactic sugar altogether, use your real hostname, and serve perseus with some directory prefix, like http://yourhost/hopper/. I won’t go into the details of this approach, but it’s not hard using the Alias command.

Once I had the perseus hostname pointing at my laptop, I told Apache to use perseus as a named-based virtual host, by adding this section to the conf/extra/httpd-vhosts.conf file:

<VirtualHost *:80>
  ServerName perseus
  DocumentRoot "/Users/paul/local/perseus/sgml/reading/static"
</VirtualHost>


Note that I’m using sgml/reading/static as the DocumentRoot. This lets me ignore the part in the Perseus instructions about creating symbolic links to the {css,img,js,xml} directories. This is perfectly safe, as there are no other files in sgml/reading/static. (You should make sure that all the parent directories are writable by you alone, however.)

You also need to configure Apache so it permits access to the Perseus directory, so in conf/httpd.conf you’ll need something like this:

<Directory "/Users/paul/local/perseus/sgml/reading/static">
  Options FollowSymLinks
  Order allow,deny
  Allow from all
</Directory>

At this point, I recommend testing your configuration before adding Tomcat to the mix. Add a one-line index.html file to sgml/reading/static. Let it just say testing or the like. Restart Apache and try to reach your index.html file. In my case, that meant visiting http://perseus/index.html. If that doesn’t work, then something above isn’t right.

Perseus wants you to use conf/localhost.conf as an additional Apache configuration file, but that didn’t work for me. If you also want to tweak the settings or do something different, it might help to know just what localhost.conf is doing. Here is an explanation of its rewrite rules. I assume some basic knowledge of regular expression syntax. Naturally, the first part of the rule is what to match; the second part, what to change it to. The letters in brackets at the end are flags. Full documentation is available here.

The first rule is this:

RewriteRule		^/hopper$		http://localhost/hopper/		[R]


This means that if you forget the trailing slash on /hopper, then Apache tells your browser to try again with it added onto the end. The [R] means “redirect.” This is a pretty trivial rule.

The next two rules read:

RewriteRule		^/hopper/home$		http://localhost/hopper/		[P,L]
RewriteRule		^/hopper/home/$		http://localhost/hopper/		[P,L]


The [P,L] stands for “proxy and last.” The P means that if the rule matches, the request should be proxied (in our case, proxied to Tomcat). The L means to stop applying rewrite rules. (It is actually redundant, because a P flag always terminates rewriting.) These rules apply if the user asks for /hopper/home or /hopper/home/. These are both weird special cases, which make /hopper/home/ synonymous with simply /hopper/. I assume they are meant to maintain backwards compatibility with older links that erroneously point to /hopper/home/.

The fourth rule says:

RewriteRule		^/hopper/opensource/(.*)	http://www.perseus.tufts.edu/hopper/opensource/$1	[P,L]


This is also a special case. If a user visits the opensource part of the site, he should go to the real Perseus site hosted by Tufts, not yours.

The last rule is the most general. It catches everything not covered by the above special cases:

RewriteRule		^/hopper/(.*)		http://localhost:8080/hopper/$1		[P,L]


This means that any requests beginning with /hopper/ should be proxied to Tomcat (at port 8080).

My rules are similar, but with a few minor tweaks. I added them to the VirtualHost section of Apache’s conf/extra/httpd-vhosts.conf file. I also gave a two-line version of this section above. Now it expands to something larger:

<VirtualHost *:80>
    ServerName perseus
    ServerAlias perseus
    DocumentRoot "/Users/paul/local/perseus/sgml/reading/static"

    <IfModule mod_rewrite.c>
        RewriteEngine On

        RewriteRule     ^/$             /hopper/    [R]
        RewriteRule     ^/hopper        /hopper/    [R]
        RewriteRule     ^/hopper/home$  /hopper/    [P,L]
        RewriteRule     ^/hopper/home/$ /hopper/    [P,L]
        RewriteRule     ^/hopper/opensource/(.*)    http://www.perseus.tufts.edu/hopper/opensource/$1   [P,L]
        RewriteRule     ^/hopper/(.*)   http://localhost:8080/hopper/$1  [P,L]
    </IfModule>

    <IfModule mod_proxy.c>
        <Proxy *>
          Order deny,allow
          Allow from all
        </Proxy>
        ProxyRequests Off

        ProxyPass           /hopper    http://localhost:8080/hopper
        ProxyPassReverse    /hopper    http://localhost:8080/hopper
    </IfModule>
</VirtualHost>

Installing Tomcat

I unpacked Tomcat at ~/local/java/tomcat. This is not where Perseus expects it. If you look at sgml/properties/hopper.properties, near the bottom you’ll find a line that reads:

tomcat.home=/usr/local/tomcat


I changed this to:

tomcat.home=/Users/paul/local/java/tomcat


Actually, tomcat is a symlink to the directory I got when I unpacked the Tomcat tarball:

$ ls -ld /Users/paul/local/java/*tomcat*
drwxr-xr-x   15 paul  paul  510 Dec 14  2007 /Users/paul/local/java/apache-tomcat-5.5.25
lrwxr-xr-x    1 paul  paul   20 May 31 17:41 /Users/paul/local/java/tomcat -> apache-tomcat-5.5.25

You probably need to adjust tomcat’s memory settings by editing bin/startup.sh, or you’ll eventually get OutOfMemoryErrors in your log. But I haven’t really looked into this yet.

You also need to set up Tomcat’s manager webapp. This is how Perseus gets installed when you type ant install. You can read about the Tomcat manager app here.

By default, the manager app is deactivated, to prevent unauthorized people from controlling Tomcat. To turn it on, you must follow the instructions at the link above. Part of the process is choosing a username and password. You’ll have to give this same username and password to the Perseus build process, so it can upload your webapp. You can set those values in this file:

sgml/properties/hosts/localhost.properties


You just need to change the lines here:

localhost.tomcat.manager.username=username
localhost.tomcat.manager.password=password


You can see if your manager is running by going here:

http://localhost:8080/manager/html


After you enter the username and password, you should see a page titled “Tomcat Web Application Manager.” You don’t need to do anything there; the ant script will do it all for you. Visiting the page is just to test that it’s up and running.

Note that once you have installed the webapp once, you should no longer use ant install. If for whatever reason you want to re-deploy the webapp, you must instead use ant remove followed by ant install. ant remove install may also work, but I’m not sure it will always give Tomcat enough time to clear out the old version before adding the new. From what I can tell, ant reload does not work. It reloads the existing webapp, but new changes go unnoticed. Perhaps this is by design. In any case, it’s an issue with the Tomcat tools, not Perseus.

At this point everything should be ready for building and deploying Perseus! You do these using these steps (as in the README file):

ant dist jsp
ant build-release
ant install

If something is wrong, you can start to isolate the problem by hitting Tomcat directly, rather than via Apache. Go to this URL:

http://localhost:8080/hopper/


If you see a Perseus page (with no images or formatting), then Tomcat is handling things properly, and the issue probably lies with your Apache configuration. If you get some kind of error message, then the problem is with Tomcat. Check catalina.out in its logs directory. If you don’t see anything there, then probably your webapp was never even deployed, due either to a build failure or not connecting to the manager app.

I hope this helps!

Posted in Uncategorized having no comments »

40 Days

May 2nd, 2009 by Arielle

Kathryn also linked to a brief article reflecting on the Orthodox practice of the mother staying home to rest, not attending church or going out unnecessarily, for 40 days after birth, when both mother and baby are welcomed back into the church and the baby is baptized. Lots of good reminders for all new mothers here!

Posted in Uncategorized having no comments »

The Naming of a Child

May 2nd, 2009 by Arielle

Those who know me know that names are one of my favorite things. I love names. I love what they mean, what they signify, and how people seem to “grow into” their names. I have always loved my name in particular. I remember in first grade, my teacher made these beautiful silhouettes of each student by having us sit in front of an overhead projector light and tracing our profiles onto black paper and cutting them out. Then she wrote our names and their meanings underneath. Arielle, “lion of God.” After studying Hebrew, it was apparent how literal the name is - “Ari” - lion. “El” - God. I have always felt that my name was something to live up to.

I especially love the meanings of names, and often look up the meanings of the names of people I meet. I’m often surprised at how well their name suits them. I’ve also looked up probably hundreds of names for future children (don’t worry, I won’t use them all!), always thinking of what I would be “bestowing” on a child with a particular name.

Since becoming Orthodox, naming a child has taken on even more significance, as we follow the custom of the earliest Christians to bestow the name of a beloved saint on Christian children, thereby entrusting the child to the prayers and intercessions of a particular saint throughout their whole lives. The priest “names” them on the eighth day after their birth with a prayer at the family’s home, and this is the name they are called as they receive the Holy Mysteries throughout their life - at baptism and chrismation, as they partake of the Eucharist, at marriage and the anointing of the sick, at their ordinations should they be ordained, and at their funeral. Many of you may remember that at our wedding, because Paul and I have both given names and “Christian” names, we were called Paul Timothy and Arielle Juliana. This is because Timothy and Juliana are our names in the Church. Our children, being born into the church, will be given Christian names at birth. Our children will be brought up knowing their saint as an integral part of their Christian family, knowing about their life and asking for their prayers. I know my own patron saint, St. Juliana of Lazarevo, has become a very important part of my life, and someone who I turn to for her intercessions often, especially now that I am becoming a mother, as she was the mother of thirteen and and STILL managed to become a very blessed saint!

This morning I read the reflections on naming a child by Kathryn, whose beautiful blog I just love. She tells the wonderful story of how her last baby, Gregory John, received his name (and please read the story - she is much better at explaining the importance of a Christian name than I am!), and this story reminded both Kathryn (who is due with number six in six weeks!) and myself about how we should go about choosing names for our children. People who are entering the Orthodox Church and therefore choosing a Christian name and a patron saint are often told, “you do not choose a saint, but a saint chooses you” meaning that the saints will often make it clear to you who is meant to be your patron. I have been thinking and thinking about what our child’s name should be, and of course it is a joint decision between Paul and I, but Kathryn’s post reminded me that it is much more important to pray that God would make it clear to us what our children’s names should be and who they should be named after. It has become less and less important to me to have our baby’s name picked out ahead of time (and of course, we would need at least two anyway!), but more important to me to wait and listen.

Posted in Uncategorized having no comments »

Ambigrams, Explosions, and Fractals

April 27th, 2009 by pjungwir

Today I started reading Martin Gardner’s collection of essays, The Night is Large, and the first chapter is about symmetry. He points out the pervasive symmetry of our universe, found in fish and crystals and human beings, and wonders why this is so. Mathematics also obeys all kinds of symmetries. But why should the universe be like this? His answer is that mathematics arose from observing the universe. That’s true, but I don’t think it really answers the question. We start out with some simple counting and measuring, but then the shocking thing is that it all works so well, so consistently. We never get to the bottom of it. As he says later, “God is a geometer.” But isn’t it interesting that we are, too? That is the insight expressed by Jacques Maritain, following Thomas Aquinas, when he says that our intelligence is made capable of knowledge; its nature is to know. It possesses an uncanny ability to understand.

Gardner also discusses breaking symmetry. This is when a system of greater symmetry changes to a system of lesser symmetry–for instance, a drop of milk falling into a full bowl. The drop is symmetrical, and the bowl is circular, so they both possess infinite symmetry: they can be reflected by any great circle or diameter, respectively. Contrast this to, say, a five-point star, which can be reflected in only five ways. A circle has more symmetry than any other two-dimensional figure, and a sphere more than any three-dimensional one. But when the drop of milk hits the surface, it creates a crown-like shape with twenty-four points. The system goes from infinite symmetry to twenty-four-fold symmetry.

Scientists imagine a similar loss of symmetry at the Big Bang. Somehow the universe went from a tiny, compact pinpoint to what we see today. The strange thing is how chunky everything is. Matter is organized into galaxies, with vast empty space between them. Within the galaxies are solar systems, again with empty space intervening. Instead of a regular consistency, we see chunks, but also extreme order. Perhaps symmetry breaking can explain how this came about.

I’ve heard similar things before, but it’s always seemed like hand-waving to me. If the universe started symmetrical, how did expansion introduce any asymmetries? This only seems possible if you admit initial impuries or asymmetries. But then you haven’t explained anything, because why should things have started out asymmetrical? That seems inelegant. But upon reading Gardner’s essay, I thought that perhaps quantum variation could be the answer. Given the erratic movement of atomic particles–or to be more precise, their probabilistic location–you would get asymmetries as soon as time starts moving. And those tiny asymmetries could blossom into the chunkiness we see today.

Gardner remarks that this is one instance of chaos theory. People love to throw around that word, and it was especially popular in the 90s (when this essay was published), but sometimes it’s hard to tell what it means. As far as I’ve been able to gather, chaos theory studies systems in which tiny details can produce unexpected large-scale results. (Sometimes you hear the opposite: that chaos theory studies how order arises from chaos. But I think these people are just making it up.) The classic example is a butterfly flapping its wings and causing a hurricane. The details are significant and interact in irreducible ways, so you cannot simplify the picture with formulae or rules. All you can do is work out the details algorithmically and see what you get. In the case of the Big Bang, the idea is that you get large-scale effects (galaxies) from small-scale details (quantum fluctations).

Gardner also connects chaos theory to fractals. Now I hear this all the time, so that it seems I never get one without the other, but I’ve never understood their relation. A fractal is just some pattern that is the same at any level of magnification. It is a pattern that contains itself repeated again and again in smaller and smaller copies. A Sierpinski triangle is a simple example; a Mandelbrot set a more complex one. But what does this have to do with chaos theory? Are all fractals chaotic? You could say that a Mandelbrot set is kind of chaotic, but not a Sierpinski triangle. Do chaotic systems act like fractals? The opposite actually seems true: if in chaotic systems the details afford no way to deduce the big picture, then they are precisely not fractals, because there the big picture is always a perfect mirror of the details, and vice versa. So I don’t get it. Why do people connect fractals with chaos theory? What is their relation?

Posted in Uncategorized having no comments »

Food post

April 6th, 2009 by Arielle

My friend Sally brought me over a jar of sourdough starter last week, and I made my first batch last night. I am a definite fan. I’ve always loved sourdough bread (the more sour, the better!) and I really like the long rising times. Makes bread making much more flexible. I’ve wrecked several batches of my normal whole wheat yeasted bread by starting it and then getting held up running errands, thus letting it over-rise, which makes it super dense on the bottom and full of air bubbles on top.

I was pretty sure I was doing the sourdough wrong the entire time. I do think I left it a bit too wet, so it’s a little dense, but I took beautifully risen, crusty, free-form loaves out of the oven last night. Paul and I ate about half a loaf while we watched three episodes of Lost (finally finished Season 4! Now we can watch Season 5 - don’t tell me ANYTHING!)

sourdough

My next project is to do the sourdough according to this tutorial. She mixes it up as a really wet dough (in a stock pot, mixing with a big rolling pin), doesn’t knead it, pours it into bread pans, and lets it rise for seven hours or more. This has several perks - it allows the sourdough to ferment the flour for long enough to break down the phytates (as opposed to my sponge/dough timing, where the sponge sits for 8 hours, but the dough for only 2-3), it is more flexible since I could make it in the morning, go to work and then cook it in the evening without any intermediate steps, and it’s a whole lot less messy. Man, did I make a disgusting mess trying to knead that wet sticky dough on the counter. At least I remembered to take my wedding rings off this time.

I will update as the sourdough experiments continue. With the sourdough, yeast bread, yogurt, Paul’s soon-to-be beer making project, and my soon-to-be kefir or kombucha experiments and whatever else I can find to grow yeast and bacteria in, we are well on our way to Paul’s projection of growing critters on our countertop four days out of seven. It may just become seven days out of seven.

Tonight is my first foray into homemade falafel.. Not sure why I haven’t made it before - I make more Middle Eastern food than any other kind, and I grew up eating falafel (my mom made the kind out of a mix) and ate the Egyptian version (ta’amayya, made with fava beans) nearly every day when I lived in Egypt. Looks easy enough. I’ll also whip up some hummus and tahina sauce, but I don’t have time to make any pita, so I got some at the Middle Eastern grocery that I am so excited to have found. They have everything there! Including haloumi, which the husband loves.

UPDATE: The falafel was a great success - so good! I made some hummus and tahina sauce to go with it, along with tomatoes and cucumbers and bottled harissa (hot sauce).

falafel-1
falafel-2
I am so glad I have a crock pot. My mom never had one, so I didn’t know how useful they were. Not only do I use it to make yogurt overnight and chicken dinners while we’re at church, but I am always cooking up dry beans while I’m at work. I’m not sure how I would make half the things I make if I couldn’t cook them while I’m at work. There are too many things to do between 6 pm and 9 pm to worry about cooking beans for three hours. My crock pot is faithfully cooked up chickpeas for eight hours while I was at work today. Being able to cook them for so long (after soaking overnight) also makes really good hummus - they’re nice and soft, so they make a really smooth creamy hummus.

I took a bunch of other pictures of food this week. I’m sure most of you don’t want to see all my food, so I’ll put them behind the link…

Read the rest of this entry »

Posted in Uncategorized having 4 comments »

Extreme Dishwashing

March 30th, 2009 by pjungwir

So I was cleaning up after dinner tonight and I was struck by my latest million-dollar idea: extreme dishwashing! It would be a gameshow where contestants compete for prizes by racing to wash a load of dishes first. Sounds boring? Well, you have neglected to consider–ginsu knives!

knives

On the show, lying beneath the soapy suds, will be knives, pizza cutters, cuisinart blades, lids cut from tin cans, even piranahs! Contestants will be penalized for each finger they lose. If you want to produce such a show–or hear any of my other brilliant ideas–just send me an email. . . .

Posted in Uncategorized having 1 comment »

A New Kind of Homebrew

March 30th, 2009 by pjungwir

With the economy struggling along, I keep hearing people talk about the collapse of civilization, like the good old Y2K scare. I think these fears are wildly unrealistic. I worry about our president’s attacks on liberty, and I worry about runaway inflation, but I don’t worry about collapse. Nonetheless, there’s nothing wrong with learning some self-reliance, right? You don’t have to be prepping for the apocalypse to prefer making to buying.

Our home is a do-it-yourself kind of place. Arielle makes her own household cleaners, and I’ve made shelves for our extra-narrow closet. We especially seem to enjoy growing things. Arielle makes bread almost every week, and lately she’s been making yogurt, too. Now she wants to start making sourdough. Meanwhile I’m trying to save money to buy beer-brewing equipment. So we’re growing critters on our counter probably three days out of seven. If disaster strikes, we’ll have plenty of yogurt and booze.

But we’ll need a lot more than that to fend of disaster if modern resources fail us. This morning, just as a thought experiment, I asked Arielle what would be really valuable, if civilization just ground to a halt. Say we had no electric grid and no more gasoline. What would be just too valuable to buy? Surely one thing is medicine, right? And one big slice of medicine is antibiotics.

Now, penicillin is the original antibiotic, and it’s just mold, right? So that got me thinking: couldn’t we make our own penicillin? With rising medical costs, wouldn’t this be big savings? Besides, I’m sure commercial penicillin contains all kinds of preservatives, so it probably causes cancer and birth defects and autism. I think I even read somewhere that phamaceutical companies, in an effort to speed up production, are now injecting penicillin with FGH (Fungal Growth Hormone), which has been alleged to cause premature meiosis in humans. So I think to be safe, we really should start growing our own. Besides, it would be a rewarding and enjoyable experience. So stick it to Big Pharma and grow your own penicillin!

. . . So after writing this post, I did some research, and it turns out there are people who have really worried about this and others who seem less worried.

Posted in Uncategorized having no comments »

ruby linkcheck

March 28th, 2009 by pjungwir

I thought a script to check our website for broken links might come in handy, so I decided to whip something up in ruby. The script takes a starting page, visits it, follows all its links, and keeps going as long as it’s still in the original domain. There is also an option to exclude certain portions of your site from being checked. I call the script like this:

$ linkcheck -e '^http://jungwirths\.com/gallery/.*' jungwirths.com

It was fun trying out something a little bigger. I’ve written a few other scripts in ruby lately; perhaps I’ll post them later.

All my work so far has been with ruby 1.8. I know 1.9 is out now, so I’d like to get it installed eventually. The Unicode support in 1.8 is pathetic. I found this out by trying to write a od-like program for UTF-8 files that mix English with polytonic Greek. I’m not sure what Unicode is like in 1.9. I haven’t been able to find anything very revealing from googling. It looks like they did something, though it was controversial. There was a lot of argument on the ruby mailing list a couple years ago. But for the life of me, I can’t find anything that explains what the final decisions were.

In my opinion Java gets Unicode just right: all strings are UTF-16, and encoding conversions happen on I/O. For instance, to read a UTF-8 file, you use a FileReader initialized to convert from that encoding. There are also I/O classes to handle binary data. The programmer’s job is simple, because Strings always act the same, and they just do the right thing. It is a very effective use of modularization and separation of concerns. But I don’t think ruby went this route, because for various reasons Unicode is unpopular in Japan. I hope the ruby approach isn’t too painful. I enjoy ruby a lot, but I can’t imagine using it in production with such remedial capabilities. Unicode for me is a real deal-breaker.

Anyway, the code for the linkcheck program is below the fold:
Read the rest of this entry »

Posted in Uncategorized having no comments »

Ladies and Gentlemen . . .

March 27th, 2009 by Arielle

. . . introducing, Lentil Jungwirth!

img

Here’s a closeup of his or her cute head:

img_0001

Yes, you heard right. We said his or her–you all will have to wait as long as we do to find out if Lentil is a boy lentil or a girl lentil! The ultrasound tech had to record the sex, but we closed our eyes. At least Paul better had closed his eyes! I told him no peeking.

You know, I imagine that women don’t often show off ultrasound pictures to coworkers. But I came straight from my ultrasound appointment next door to work, and had my pictures with me, so I showed a couple people who I know well. I do work with a bunch of nurses and midwives, after all.

I imagine most people look at ultrasound pictures, and say things about how cute the baby is, and how clear you can see its features, even if it really looks like a blurry, skinny alien. I bring mine in, and the first things my midwife colleagues exclaim are, “Look at those bones!” and “Hey look, an anterior placenta!”

Just so you know, it is impolite to say that someone’s baby looks like a skinny alien, even if his or her mamma said it first.

Posted in lentil having 5 comments »

Did you know embryos are not fertilized?

March 20th, 2009 by Arielle

This video is just unbelievable. The former leader of the free world, whose wife was nearly the current leader of the free world, being interviewed by the brain surgeon that our current president nominated for Surgeon General, states over and over again that embryos are not fertilized. Wow, will wonders ever cease? Maybe they need to take one of those grade school sex education classes that the former president and his wife were so supportive of.

Sorry. I’m usually opposed to snarkiness. But I’m making an exception, because this is ridiculous enough to be snarked.

Posted in Uncategorized having 3 comments »