I have started to rewrite dictionaries in Ellinika project. The idea is to use XML instead of the definition language I have been using so far. The latter was designed to be simple, short (I hate to type) and suitable for describing dictionary entries. Its parser is written in C and is therefore fairly fast. Presently, the dictionary created with it contains 1150 entries, and the process of its creation has confirmed that the dictionary structure is right and input language generally suitable for the purpose. However, it has also exposed some drawbacks of the language.
The principal drawback is that currently a dictionary entry is supposed to contain only one part of speech 1) , i.e. currently assumed entry structure is:
However, there exist words that pertain to several parts of speech simultaneously, and that change their meaning according to the part of speech. For example, κρυώνω, when used as a transitive verb, means to refrigerate, whereas being used as an intransitive verb it means to feel cold, to freeze. The number of such words (verbs in particular) in Greek is fairly large.
So, I have decided to redesign the input language, but instead of simply fixing the already existing language, I've chosen to fully write the dictionary sources in XML.
(as usual, optional elements are inclosed in brackets, * means zero or more occurrences of the element, and + means one or more occurrences of the element).
Introduces the dictionary key, i.e. the word of the source language that is explained by this entry. There may be several keys if the notion in question has several sinonyms.
Introduces grammatic forms of the key, whenever these are not formed by standard rules. In future I expect to write proper verb conjugator, then this field will probably mark a reference to or invocation of it.
Part of speech and meanings associated with it (see below). Attribute ID introduces the name (usually abbreviated) of the part of speech.
Cross-reference for this entry. Usually this is a reference to sinonym or some semantically related key.
Topic or group this entry pertains to. ID identifies the topic. When many entries pertain to the same topic, their definitions can be enclosed in
There are two special forms of this notation. One is useful as a shortcut for those words that have only one part of speech (as I said I hate to type, so I'm trying to spare as much typing as possible):
This is useful for such pairs as "ο ποταμός" and "το ποτάμι", both meaning "river" but having different genders. The special form <X /> means reference to the immediately preceeding node definition wich has at least one translation (M element).
The initial version of the dictionary translator is already available. See its heading comment for the short description of the internal representation (Scheme of course).
1) The term part of speech is used here in broader meaning: e.g. for the dictionary purposes transitive verbs and intransitive verbs are regarded as different parts of speech. I'll possibly have to introduce finer granularity here (e.g. part-of-speech/subpart or something similar), but currently I am not sure it will be worth the effort.
I've fixed a nasty coredump that occurred if the option name of an OPTION_DOC was set to NULL. Besides, updated argp will never attempt to translate an empty help string. And finally, new option OPTION_NO_TRANS prohibits translating name field of an OPTION_DOC option. The latter is already used by tar.
Well, it took four days to entirely rewrite lingua in Scheme using xmltools. Now it allows much greater flexibility than eXtrans version did. Moreover, it is easily extensible. There are still some minor points to work out, but as a whole xmltools+lingua is quite mature now, uhmm..., except for the docs... I'll need some time to write them. Then I'll probably host the project on Gna!.
In the meanwhile I have already rewritten ellinika using the new stuff. It allowed me to use normal Makefiles, split the single source file into several smaller ones and do a lot of cool things I couldn't have dreamed of using eXtrans version.
I had a bit of free time, so I've used it to polish LINGUA engine. Currently it is written using eXtrans , which, albeit a great program, is not flexible enough for my needs. In addition to already described problems, its handling of nested tags is not consistent.
Surely I could have modified it further, but it appeared to me that I'd be better off writing a replacement for it from the scratch. And of course I was going to write it in Scheme :)
So, I've started a new project under a working name xmltools. It is a collection of Guile modules that should provide the functionality similar to that of eXtrans yet largely extended and improved. The project uses expat library and Mixp - a Guile interface module to expat.
In its current state, xmltools already supply all of eXtrans functionality, including postprocessor support.
Today I have written basic part of lingua.scm. The good thing is, it is already able to process xml and produce valid html output!
First is in Anubis. When running Anubis test suite in authmode, Wojciech noticed that some daemon instances enter endless loop attempting to free a chunk of memory.
My further investigation has shown that it always occurred when trying to free an ASN1 node belonging to _gnutls_pkix1_asn tree. The bug manifests the following regularities:
With MALLOC_CHECK_=2 the bug never appears. I find it extremely uncommon, even taking into account Murphy's law. I suspect it to be a very important issue, although at the moment I cannot say why.
It seems like a heap corruption, the two basic questions are: why it is not revealed at an earlier stage by malloc debugging code, and why enabling this same debugging code makes the bug disappear? It will take a while to answer these questions...
Yep, the second one is there. It manifests itself as an incorrect comparison of two struct timeval. More precisely, in the following snippet:
timercmp incorrectly returns false when now differs from start by several milliseconds (the actual order of magnitude of tval is several seconds).
Paxutils' official page at http://www.gnu.org/software/paxutils is still unavailable, despite the fact that I have uploaded an updated version two days ago. E-mails to Savannah hackers and GNU webmasters have so far given null effect. In fact, they remained unanswered.
Version 2.5.90 of cpio is available for download from alpha.gnu.org. This is the first version of GNU cpio with official NLS support.
The festivities are over, and I'm back to work on free software. After more than half a year delay (!!!), Savannah people have approved paxutils. The project seems to have bad karma... Anyway, since I've just released tar 1.14.90 and the version 2.5.90 of cpio is ready and working, I've started merging the two projects into paxutils. The road will be long. I am going to export as much of the good ideas and as little of the codebase from each package as possible.
If everything goes as expected, the first version of paxutils should be ready by the January. If, on the contrary, the things continue going from bad to worst as they have been during all this year... well, then I'll make it by the beginning of March.