I've written a piece of software that bolts onto another piece of software. It does something really cool, but that's not relevant to this post. What is relevant is that my bolt-on needs to reference assemblies in the other software, including third-party assemblies. My bolt-on may be deployed in environments with various versions of assemblies in various configurations. It turns out that it can be very difficult for me to get access to those assemblies to test and compile with--usually for licensing reasons.
To solve this, I created something I am calling "shadow assemblies". These are skeleton assemblies with only the classes and methods that I am actually using, but they use reflection to reach out and manipulate the real assemblies at run time. My code can treat the shadow assembly exactly the way it used to treat the real assembly, but I don't need to worry about different versions of the real assemblies as long as the differences are irrelevant to the functionality I am using.
I feel like there ought to be some interesting ways to push the envelope on this. For example, your shadow assembly could be running on one machine, interacting with the real assembly on another machine via some kind of protocol. Or you could swap out the real assembly with an output generator that would feed all kinds of data back to your system for simulation and testing purposes.
Friday, July 26, 2013
Monday, July 22, 2013
Encoding two messages simultaneously with a book code
Book codes are a convenient type of polyalphabetic cipher from the days before computation. The basic idea is that a book (or other text) serves as the key, and the code consists of a list of indexes for words in the key, from which a letter is taken to build the text.
A famous example is the the second Beale cipher, which uses a version of the Declaration of Independence as a key. The key consists of 1322 words, any of which may be used to encode the 26 letters of the alphabet. Since the key contains many alternatives for most letters, the sender may choose randomly among those options in order to make it difficult to do frequency analysis.
If they key text is short and the sender is lazy, there may be some weaknesses in the cipher, but I won't dwell on those here. Instead, let's look at how much information is contained in the cipher text compared to the plain text, if the Declaration of Independence is used:
Imagine how the 19th century sender might prepare his message: First, he reads through the key and prepares a list of alternative encodings for each letter of the plaintext. So far, it's just a normal book cipher. But then, he turns the list on its side and makes it a grid, so the first possible code for m can represent an a, and the 13th possible code for a can represent an m.
With a small key, the sender will have bottlenecks around low-frequency letters. The Declaration of Independence only gives you four words starting with k, for example, so you will be better off if you rearrange your alternate alphabet in order of descending frequency, so your four variants of k represent e, t, a, o. Even then, of course, there will be problems. A large key is definitely better if both messages are important.
But if one of the messages is truly important, and the other message is just a cover, then the sender can probably work out a plausible message using the simple book code that will adequately conceal the true message. For example, using the same cipher as Beale text 2:
A famous example is the the second Beale cipher, which uses a version of the Declaration of Independence as a key. The key consists of 1322 words, any of which may be used to encode the 26 letters of the alphabet. Since the key contains many alternatives for most letters, the sender may choose randomly among those options in order to make it difficult to do frequency analysis.
If they key text is short and the sender is lazy, there may be some weaknesses in the cipher, but I won't dwell on those here. Instead, let's look at how much information is contained in the cipher text compared to the plain text, if the Declaration of Independence is used:
Expansion factor = ln 1322 / ln 26 = 2.205858830928307The cipher text contains just over twice the amount of information as the plain text. Normally, the extra information would be random noise, but in fact you could send a second message in that bandwidth if you wanted to.
Imagine how the 19th century sender might prepare his message: First, he reads through the key and prepares a list of alternative encodings for each letter of the plaintext. So far, it's just a normal book cipher. But then, he turns the list on its side and makes it a grid, so the first possible code for m can represent an a, and the 13th possible code for a can represent an m.
With a small key, the sender will have bottlenecks around low-frequency letters. The Declaration of Independence only gives you four words starting with k, for example, so you will be better off if you rearrange your alternate alphabet in order of descending frequency, so your four variants of k represent e, t, a, o. Even then, of course, there will be problems. A large key is definitely better if both messages are important.
But if one of the messages is truly important, and the other message is just a cover, then the sender can probably work out a plausible message using the simple book code that will adequately conceal the true message. For example, using the same cipher as Beale text 2:
High value message: THE ARMY DEPARTS AT DAWN
Cover message: NO ACTION TILL DECEMBER
Coded message: 44, 132, 24, 195, 39, 319, 298, 269, 3, 286, 234, 334, 52, 89, 195, 33, 210, 231, 511, 96Don't get your hopes up, though. This was not done with the Beale cipher.
Sunday, July 21, 2013
Secret Languages
I love the idea of secret languages. It started out as a fascination with foreign writing systems when I was a kid, which turned into a love of ciphers and codes. Around age 10 or so, I decided I wanted to create a code you could speak, so I started with a simple cipher where consonants were shifted up the alphabet by one letter, and vowels likewise shifted up the list of vowels:
O jewi e tidsiv mephaehi
I have a secret languageThis kind of code was somewhat speakable, but I realized it was also creating strange and unusual consonant clusters (as in the word tvsuph for "strong"). I gradually started dividing the sounds of English into continuants and stops, then I discovered place of articulation, and manner of articulation. Eventually I had a fairly sophisticated, relatively speakable code that first required the English plaintext to be represented phonetically, then shifted around in terms of place of articulation:
el rɛɣ ə θutʃjɪp wɛndʒhʊdz
I have a secret language
Then, one day, I realized you could solve the whole pronunciation problem by substituting morphemes, and my brother and I started to create an actual secret language. It went through many revisions, but in the latest form that the language has in my mind, you can say:
tan kɪp tʃ tollani namrɪl
I have a secret language
Though my brother's dialect is different from mine, so to him I would say:
tan kɪp tʃ namrɪl koji ekaj tol la
I have a language that other people do not know
Over the years of playing with this, I have landed on a kind of formula for effective secret languages. I have run out of time for the moment, but an upcoming post will be about the formula for an effective, easy secret language.
Friday, July 19, 2013
渤海 Language
There was a kingdom called 渤海 in what is now North Korea and North-Eastern China. For nationalistic reasons, certain modern nations are keen to assert that the people of that kingdom belonged to their own ethnic group and spoke their own language. The system of romanization you use has intense political ramifications. (Just read the talk pages on Wikipedia for this and related kingdoms.)
In order to sidestep this debate, I will use Chinese characters instead of contested historical names throughout this post.
No texts in the 渤海 language survive, so all we can do is speculate based on historical sources. In fact, it appears that the 渤海 may have used the Chinese language as their literary language, based on a passage from the history of the Jurchen Jīn dynasty:
If we assume that the collective name of the seven tribes, 靺鞨, was pronounced the same as the phonetics 末曷, then that gives is an OCM reconstruction of *mat-gât. The Early Middle Chinese reconstruction of 渤海, for comparison, is *bət-xəy'. It seems like it is not entirely impossible to say that the name 渤海, which appeared in the Táng, is a later form of the older 靺鞨, having undergone some sound changes. The sound change from m > b is not well represented, though we do find it in the Manchu words for "monkey", monio and bonio.
The language of 渤海, if it was anything other than pre-Jurchen, should have left some loan words in Manchu. Indeed, the Manchu language has a large store of enigmatic words whose etymologies can't be found in Tungusic, Mongolic or Chinese. Much of these will no doubt be Khitan, but some of them may be 渤海. Khitan itself is likely to have some 渤海 loans, as well.
Someone really needs to do a careful archeology of Manchu in order to make sense of the enigmatic vocabulary. Among the words whose origins are indeterminate are many words containing palatal velars (represented by -giy-, -kiy-, -hiy- in the Manchu script), including the name of the Manchu royal clan, gioro. The following relatively common words are also enigmatic: boigon, "family"; boo, "house"; bonio, "monkey"; abka, "heaven"; aga, "rain"; wece-, "to shamanize"; ganio, "supernatural".
Someone also needs to do an analysis of the pre-Chinese place names of the Changbaishan, among which there are a fair number with palatal velars. I wonder if a careful linguistic archeology might not reveal the presence of an otherwise unattested substratum language in the area of the Yalu river and Changbaishan.
In order to sidestep this debate, I will use Chinese characters instead of contested historical names throughout this post.
No texts in the 渤海 language survive, so all we can do is speculate based on historical sources. In fact, it appears that the 渤海 may have used the Chinese language as their literary language, based on a passage from the history of the Jurchen Jīn dynasty:
乙未,诏百官诰命,女直、契丹、汉人各用本字,渤海同汉人。Ethnically, the Jurchens seem to have believed that they were related to the 渤海, since the Taizu of the Jīn dynasty promulgated an edict saying:
On the yiwei day, [the emperor] issued edicts to the hundreds of officials. For the Jurchens, Khitans and Chinese, he used their own scripts; For the 渤海, [he used] the same as the Chinese.
女直、渤海本同一家。Indeed, the history of the Jurchen Jīn says:
The Jurchens and 渤海 are originally one family.
粟末靺鞨始附高麗,姓大氏。李績破高麗,粟末靺鞨保東牟山。後爲渤海,稱王,傳十餘世。有文字、禮樂、官府、制度。有五京、十五府、六十二州。
The 粟末靺鞨 allied themselves to 高麗, and took the surname Dashi. After [the Tang official named] Li Ji destroyed 高麗, the 粟末靺鞨 guarded over Dongmo Hill. Later, they became the 渤海, were called kings, and for ten generations had writing, laws, music, official courts, systems, customs, five capitals, fifteen prefectures, and sixty-two districts.The 粟末靺鞨 here are one of the seven tribes of 靺鞨 from whom the Jurchens held themselves to be descended. The characters 粟末 are reconstructed as *sok-mat in OCM (Minimal Old Chinese), and represent an ancient name for the Sunggari river (now called Songhua). I expect the river name was something like *sugmar, which became *sumgar through metathesis, *sunggar through assimilation.
If we assume that the collective name of the seven tribes, 靺鞨, was pronounced the same as the phonetics 末曷, then that gives is an OCM reconstruction of *mat-gât. The Early Middle Chinese reconstruction of 渤海, for comparison, is *bət-xəy'. It seems like it is not entirely impossible to say that the name 渤海, which appeared in the Táng, is a later form of the older 靺鞨, having undergone some sound changes. The sound change from m > b is not well represented, though we do find it in the Manchu words for "monkey", monio and bonio.
The language of 渤海, if it was anything other than pre-Jurchen, should have left some loan words in Manchu. Indeed, the Manchu language has a large store of enigmatic words whose etymologies can't be found in Tungusic, Mongolic or Chinese. Much of these will no doubt be Khitan, but some of them may be 渤海. Khitan itself is likely to have some 渤海 loans, as well.
Someone really needs to do a careful archeology of Manchu in order to make sense of the enigmatic vocabulary. Among the words whose origins are indeterminate are many words containing palatal velars (represented by -giy-, -kiy-, -hiy- in the Manchu script), including the name of the Manchu royal clan, gioro. The following relatively common words are also enigmatic: boigon, "family"; boo, "house"; bonio, "monkey"; abka, "heaven"; aga, "rain"; wece-, "to shamanize"; ganio, "supernatural".
Someone also needs to do an analysis of the pre-Chinese place names of the Changbaishan, among which there are a fair number with palatal velars. I wonder if a careful linguistic archeology might not reveal the presence of an otherwise unattested substratum language in the area of the Yalu river and Changbaishan.
Friday, July 12, 2013
The Bulgar Calendar (done to death)
So I'm going to try to nail down my final interpretation of the Bulgar Calendar cycle.
Start with the Chatalar inscription, which has the year 821 in the Byzantine calendar, and sigor elem in the Bulgar calendar:
sigor, ox
elem, metal | white
Telets was defeated by the Byzantines in battle at Anchialus in 763. If he reigned for three years, then somor altem, when he took the throne, must be on or after 760. If altem = alem = elem, then that narrows it down to 760 or 761. As it happens, 761 was also an Ox year, and we know Ox was not somor, so we'll say he took power in 760:
somor, rat
altem, metal | white
Umor took the throne after Telets, so 763 or 764. There are some caveats here: nomadic empires tended to choose their leaders by council (thus explaining why the different kings came from different clans), but also a new leader could not be chosen until the council had a chance to meet. Not only that, but the first year of a reign was usually recorded as the first new year after taking power. For now, let's be fuzzy about Umor's year:
dilom, rabbit (33%) / dragon (33%) / snake (33%)
toutom, water | black (33%) / wood | green (66%)
The reigns from Avitohol to Bezmer are partially legendary, so we can probably assume that the years and reigns make sense in the legendary context, even if we can't really tie them to historical events. If there were two years from Gostun to Kurt, and Kurt took power in an Ox year (šegor večem), then Gostun must have taken power in a Boar year, so:
dohs, boar
Irnik's legendary 150-year rule would have started, then, in a Snake year (dilom tverim). That settles the question about Umor's reign, which must have started in the Wood Snake year 765, so we can say:
dilom, snake
toutom, wood | green
If we assume Gostun's vtirem is a mistake for tvirem (which it should be based on the legendary reign lengths), then we know that tvirem and večem must be adjacent in the cycle of elements. The cycle is Fire, Earth, Metal, Water, Wood, and we've already identified Metal and Wood, so the only adjacent unknowns are Fire and Earth. That means:
tvirem, fire | red
večem, earth | yellow
And, by process of elimination, the remaining unknown element must be Water.
Tervel is fairly well-documented, being first mentioned in 704, and last mentioned by Theophanes the Confessor in 718 or 719. If he ruled for 21 years, then there is no way that he could have taken power in a Water year (692-693 or 702-703). Despite the fact that tvirem looks like a king name based on the format of the list, it seems more likely to be part of Tervel's year, and that the name of the king after Tervel is simply missing. In that case, Tervel could have taken power in the Fire Rooster year of 697 and ruled for 21 years till 718, so:
tekučitem, rooster
Between Tervel and Telets (718-760) there are around 42 years. This is best accounted for by assuming that there was no ruler between Tervel and Sevar. Sevar took power in a Metal year, so either the Monkey or Rooster years of 720-721. Since we already have Rooster, that leaves:
toh, monkey
Kormisosh must have taken power in the Fire Ox year (šegor tvirem) 737, accommodating the 15 years of the reign of Sevar and a couple years of interregnum. From 737 till 760 there are 23 years to accommodate the 17-year reign of Kormisosh and the 7-year reign of Vinekh. There is no way to read Vinekh's year as a šegor alem year, since those fell on 701 and 761. Reluctantly, we must follow the text, and say that imaše goralem is most likely the Water Dragon year of 752
imaše, dragon
goralem, water | black
That leaves the vereni alem of Asparukh's reign. Asparukh reached the Danube around 674-678, and Tervel took power in 697. If we believe the 61-year reign, then this should either be the Tiger or Rabbit years of 630-631.
Notes added 10/29/2013:
Some of these words have Turkic reflexes (definitions below taken from Clauson):
altem, alem, elem, metal | white; compare Old Turkic altu:n, gold
dohs, boar; compare Old Turkic toŋuz, 'pig'
dilom, snake; compare Old Turkic yıla:n (< dıla:n), 'snake'
tekučitem, rooster; compare Old Turkic takı:ǧu:, 'domestic fowl'
Notes added 10/29/2013:
Some of these words have Turkic reflexes (definitions below taken from Clauson):
altem, alem, elem, metal | white; compare Old Turkic altu:n, gold
dohs, boar; compare Old Turkic toŋuz, 'pig'
dilom, snake; compare Old Turkic yıla:n (< dıla:n), 'snake'
tekučitem, rooster; compare Old Turkic takı:ǧu:, 'domestic fowl'
Bulgar Calendar (revisited)
Always go back to the primary source.
I took a look at the Uvarov Transcript text of the Nominalia of the Bulgar Kings, and found a couple of interesting discrepancies between it and the translation I used in my last post.
To me, it looks like there is a king named Tvirem between Tervel and Sevar, who reigned for 28 years, and his year was dvanšehtem. It's confusing, perhaps, because tvirem is a part of many of the year names, but it really does seem pretty clear. Check it out:
Тервен. -к~а. лето. род ему Дуло. а лет ему текучитем.
твирем. ~(ки). лет. род ему Дуло. а род ему дваншехтем.
Севаръ. ~(еl). лет. род ему Дуло. а лет ему тохалтом.
I redid the list from the original:
Avitohol ruled 300 years from the year dilom tvirem
Irnik ruled 150 years from the year dilom tverim
Gostun ruled 2 years from the year dohs vtirem
Kurt ruled 60 years from the year šegor večem
Bezmer ruled 3 years from the year šegor vem
Asparuh ruled 61 years from the year vereni alem
Tervel ruled 21 years from the year tekučitem
Tvirem ruled 28 years from the year dvanšehtem
Sevar ruled 15 years from the year tohaltom
Kormisosh ruled 17 years from the year šegor tvirim
Vinekh ruled 7 years from the year imaše goralem
Telets ruled 3 years from the year somor altem
Umor ruled 40 days from the year dilom toutom
It seems like a huge coincidence that imaše goralem could also be parsed ima šegor alem.
I took a look at the Uvarov Transcript text of the Nominalia of the Bulgar Kings, and found a couple of interesting discrepancies between it and the translation I used in my last post.
To me, it looks like there is a king named Tvirem between Tervel and Sevar, who reigned for 28 years, and his year was dvanšehtem. It's confusing, perhaps, because tvirem is a part of many of the year names, but it really does seem pretty clear. Check it out:
Тервен. -к~а. лето. род ему Дуло. а лет ему текучитем.
твирем. ~(ки). лет. род ему Дуло. а род ему дваншехтем.
Севаръ. ~(еl). лет. род ему Дуло. а лет ему тохалтом.
I redid the list from the original:
Avitohol ruled 300 years from the year dilom tvirem
Irnik ruled 150 years from the year dilom tverim
Gostun ruled 2 years from the year dohs vtirem
Kurt ruled 60 years from the year šegor večem
Bezmer ruled 3 years from the year šegor vem
Asparuh ruled 61 years from the year vereni alem
Tervel ruled 21 years from the year tekučitem
Tvirem ruled 28 years from the year dvanšehtem
Sevar ruled 15 years from the year tohaltom
Kormisosh ruled 17 years from the year šegor tvirim
Vinekh ruled 7 years from the year imaše goralem
Telets ruled 3 years from the year somor altem
Umor ruled 40 days from the year dilom toutom
It seems like a huge coincidence that imaše goralem could also be parsed ima šegor alem.
Thursday, July 11, 2013
Prelude to "Deadly Weakness"
In China, there has not historically been a genre of "spy novels" like those produced in the West for the last century or so. A number of American spy novels have been translated into Chinese, but it is only in the last ten years that Chinese authors have undertaken the task of writing original Chinese works in this genre. One such author is Yang Hengjun, who published a trilogy serially on the internet in the years prior to the 2008 Beijing Olympics.
The following is my translation of the opening to his first novel, Deadly Weakness.
Prelude
A human body processing plant in the suburbs of the city of Qingdao, in Shandong province.
"Mr. Yang, thank you for coming," said the receptionist, with a professional smile. "May I ask where you learned about our plant?"
"I saw your German founder at a display of human body specimens in Hong Kong three years ago. Several hundred thousand people from Hong Kong attended it."
"Oh, yes, I remember. Ticket sales from the Hong Kong event earned our founder more than a million HKD. But that wasn't the most significant benefit from that event!" The receptionist accompanied him now, eager to introduce him to the plant. "Prior to the Hong Kong display, people told our boss that Chinese people are superstitious and consider dead bodies to be taboo--but he went ahead and did it, and hundreds of thousands of people came to see the display. Their interest in the processing of human bodies far outstripped what we see even in Western countries, so our president decided to establish a body processing plant here in China. Presently our body processing plan is the largest in scale of any plant he owns in the world, with 1,860 workers, able to handle the processing of six thousand cadavers per year...."
Yang interrupted her. "Where do all the bodies come from?"
"The bodies all come from overseas."
"Oh, so...so do you have any that are my height?" Yang asked tentatively.
The receptionist glanced at Yang, hiding her surprise, then smiled. "Do you think Germans are all tall and burly? In fact, a lot of the cadavers are about your stature. Since they are all immersed in special chemicals for shipping, processed by our technicians after they have arrived, then again put through a procedure that may take nine more months to produce a specimen, when they're all finished the height of the cadaver is usually about four centimeters shorter than the original body."
Yang nodded his head. They were passing by a blue sign on the wall in English and Chinese that read "Work Center 1", and the receptionist explained: "This is where we receive international shipments of bodies, primarily from Germany. We unpack the frozen bodies, remove their internal organs, then place them into a individual containers, immersed in a proprietary chemical formula. This formula was created by our boss, and it's a lot like the formula for the Coca Cola you might drink every day, protected by patents all over the world. The body remains here for six months, then moves on to Work Center 2, where it is primarily made mold-proof and desiccated. When it is done there, the body is a lot like a Jianhua ham--no matter what temperature or condition, it won't deteriorate. Even more like a Jinhua ham, if you were to put it in a supermarket, not even a maggot would want to eat it. The next process takes place in Work Center 3, where the body undergoes the boss's own special process for at least six months. Their duty is to take the processed body and to pose it very carefully according to the customer's wishes. Some look like they are in mid-leap in a soccer game. Some look like they would rush off to the battlefield if you were to just put a gun in their hands. Some might be in the eighteen sexual positions, while if you were to place others in a public library, you might think they were real live people reading books, and you would tiptoe quietly by. Lastly, we use a technique that fixes the bodies in their flamboyant postures. Only our boss knows how to employ this technique. Once the posture is fixed, even though you might think they look young and relaxed, there is no way you could move them. Our human body specimens are unique. Though their postures and expressions are worked out to the finest detail, and our products seem vivid and lifelike, nonetheless they could last fifty years without changing."
"Other factories are laying people off, but you guys are still hiring, so your business must be doing well," Yang said, covering his nose.
"We can't even supply enough product to meet the demand." The receptionist could not conceal her pride on this point. "At first it was only medical laboratories and universities that wanted them for their teachers to use, but now more and more institutions are placing orders, and even some individuals want a body to take back and use to decorate their offices and homes..."
"Are they all sold overseas?" asked Yang.
"Not all of them. Currently some Chinese institutions have started to buy from us. Originally, when our boss established his largest factory here, he was looking at the potential of the Chinese market. At that time, this factory just took in materials (bodies) and sold the product overseas, and I hear that it won't be long before he opens a second and third factory here in China. Then he will apply to market them locally. Oh, right. Mr. Yang, do you want to buy a body in some particular posture?" The receptionist looked Yang over from head to toe as she asked.
"I...I want to buy one that looks like it is sitting and driving a car."
"Interesting, but among our clients there are people who are looking for any kind of posture. I think Mr. Yang must be a car collector. OK, I think it shouldn't be a problem. You could have it for $50,000 HKD, but you'd have to wait a year for the goods."
"No, I need it this week. I can throw in another $20,000 to expedite it." Yang's eyes looked off into the distance.
The receptionist thought a moment, took out a handheld inventory tracker, and made a show of going through it. At last she raised her head with a relieved sigh, "You're in luck, Mr. Yang. We have a body in the posture you are looking for, we just need to put in a little extra work to raise the arms up. I'll see that the contract is drawn up. After you pay, you can go back to Guangzhou, and the product will follow you a few days later."
"Thank you!" Once they had finished talking, Yang no longer had any interest in seeing the factory.
The following is my translation of the opening to his first novel, Deadly Weakness.
Prelude
A human body processing plant in the suburbs of the city of Qingdao, in Shandong province.
"Mr. Yang, thank you for coming," said the receptionist, with a professional smile. "May I ask where you learned about our plant?"
"I saw your German founder at a display of human body specimens in Hong Kong three years ago. Several hundred thousand people from Hong Kong attended it."
"Oh, yes, I remember. Ticket sales from the Hong Kong event earned our founder more than a million HKD. But that wasn't the most significant benefit from that event!" The receptionist accompanied him now, eager to introduce him to the plant. "Prior to the Hong Kong display, people told our boss that Chinese people are superstitious and consider dead bodies to be taboo--but he went ahead and did it, and hundreds of thousands of people came to see the display. Their interest in the processing of human bodies far outstripped what we see even in Western countries, so our president decided to establish a body processing plant here in China. Presently our body processing plan is the largest in scale of any plant he owns in the world, with 1,860 workers, able to handle the processing of six thousand cadavers per year...."
Yang interrupted her. "Where do all the bodies come from?"
"The bodies all come from overseas."
"Oh, so...so do you have any that are my height?" Yang asked tentatively.
The receptionist glanced at Yang, hiding her surprise, then smiled. "Do you think Germans are all tall and burly? In fact, a lot of the cadavers are about your stature. Since they are all immersed in special chemicals for shipping, processed by our technicians after they have arrived, then again put through a procedure that may take nine more months to produce a specimen, when they're all finished the height of the cadaver is usually about four centimeters shorter than the original body."
Yang nodded his head. They were passing by a blue sign on the wall in English and Chinese that read "Work Center 1", and the receptionist explained: "This is where we receive international shipments of bodies, primarily from Germany. We unpack the frozen bodies, remove their internal organs, then place them into a individual containers, immersed in a proprietary chemical formula. This formula was created by our boss, and it's a lot like the formula for the Coca Cola you might drink every day, protected by patents all over the world. The body remains here for six months, then moves on to Work Center 2, where it is primarily made mold-proof and desiccated. When it is done there, the body is a lot like a Jianhua ham--no matter what temperature or condition, it won't deteriorate. Even more like a Jinhua ham, if you were to put it in a supermarket, not even a maggot would want to eat it. The next process takes place in Work Center 3, where the body undergoes the boss's own special process for at least six months. Their duty is to take the processed body and to pose it very carefully according to the customer's wishes. Some look like they are in mid-leap in a soccer game. Some look like they would rush off to the battlefield if you were to just put a gun in their hands. Some might be in the eighteen sexual positions, while if you were to place others in a public library, you might think they were real live people reading books, and you would tiptoe quietly by. Lastly, we use a technique that fixes the bodies in their flamboyant postures. Only our boss knows how to employ this technique. Once the posture is fixed, even though you might think they look young and relaxed, there is no way you could move them. Our human body specimens are unique. Though their postures and expressions are worked out to the finest detail, and our products seem vivid and lifelike, nonetheless they could last fifty years without changing."
"Other factories are laying people off, but you guys are still hiring, so your business must be doing well," Yang said, covering his nose.
"We can't even supply enough product to meet the demand." The receptionist could not conceal her pride on this point. "At first it was only medical laboratories and universities that wanted them for their teachers to use, but now more and more institutions are placing orders, and even some individuals want a body to take back and use to decorate their offices and homes..."
"Are they all sold overseas?" asked Yang.
"Not all of them. Currently some Chinese institutions have started to buy from us. Originally, when our boss established his largest factory here, he was looking at the potential of the Chinese market. At that time, this factory just took in materials (bodies) and sold the product overseas, and I hear that it won't be long before he opens a second and third factory here in China. Then he will apply to market them locally. Oh, right. Mr. Yang, do you want to buy a body in some particular posture?" The receptionist looked Yang over from head to toe as she asked.
"I...I want to buy one that looks like it is sitting and driving a car."
"Interesting, but among our clients there are people who are looking for any kind of posture. I think Mr. Yang must be a car collector. OK, I think it shouldn't be a problem. You could have it for $50,000 HKD, but you'd have to wait a year for the goods."
"No, I need it this week. I can throw in another $20,000 to expedite it." Yang's eyes looked off into the distance.
The receptionist thought a moment, took out a handheld inventory tracker, and made a show of going through it. At last she raised her head with a relieved sigh, "You're in luck, Mr. Yang. We have a body in the posture you are looking for, we just need to put in a little extra work to raise the arms up. I'll see that the contract is drawn up. After you pay, you can go back to Guangzhou, and the product will follow you a few days later."
"Thank you!" Once they had finished talking, Yang no longer had any interest in seeing the factory.
Tuesday, July 9, 2013
The Bulgar Calendar
Note--I have revised my interpretation. See the post titled "The Bulgar Calendar (done to death)"
The Bulgars were a Central Asian people who migrated into the Pontic steppe and the Volga basin.
Three Russian manuscripts have been found which list the reigns of Bulgar kings, and these manuscripts contain a clue about the Bulgar language: The reign of each king is assigned a two-part year name. Since 1913, these two-part year names have been understood to be dates in a 12-year cyclic calendar, where the first part is the name of an animal, and the second part is a month.
Wikipedia has a translation of the earliest manuscript in its article on the Nominalia of the Bulgar Khans. I'll copy just the translation here:
The Bulgars were a Central Asian people who migrated into the Pontic steppe and the Volga basin.
Three Russian manuscripts have been found which list the reigns of Bulgar kings, and these manuscripts contain a clue about the Bulgar language: The reign of each king is assigned a two-part year name. Since 1913, these two-part year names have been understood to be dates in a 12-year cyclic calendar, where the first part is the name of an animal, and the second part is a month.
Wikipedia has a translation of the earliest manuscript in its article on the Nominalia of the Bulgar Khans. I'll copy just the translation here:
- Avitohol lived 300 years. His clan was Dulo and his year (of ascending to the throne) dilom tvirem.
- Irnik lived 150 years. His clan Dulo and his year dilom tverim.
- Gostun, the regent, 2 years. His clan Ermi and his year dokhs tvirem.
- Kurt ruled 60 years. His clan Dulo and his year shegor vechem.
- Bezmer 3 years and his clan Dulo and his year shegor vem (vechem).
These five princes ruled the kingdom over the other side of the Danube for 515 years with shaven heads and after that came to this side of the Danube Asparuh knyaz and until now (rules).
- Asparuh knyaz 61 years (ruled). His clan Dulo and his year vereni alem.
- Tervel 21 years. His clan Dulo and his year tekuchitem tvirem.
(An additional ruler is sometimes inserted here, depending on the reading.)
- Sevar 15 years. His clan Dulo and his year toh altom.
- Kormisosh 17 years. His clan Vokil and his year shegor tvirem.
- Vinekh 7 years. His clan Ukil. And his year (imen)shegor alem.
- Telets 3 years. His clan Ugain and his year somor altem.
- Umor (ruled) 40 days. His clan Ukil and his year dilom tutom.
What I think is interesting here is that no one who has worked on this apparently understands how the 12-year calendars work. A date in the cyclical calendar common to most of the Central Asian and Chinese world has two parts, one part chosen from a cycle of 12, and the other part chosen from a cycle of 5 or 10, making a long cycle of 60 years. In other words, the second part is not a month.
(Note--when only five terms are used, each term is repeated twice, so in the Tibetan calendar you have wood, wood, fire, fire, earth, earth, metal, metal, water, water, for example).
Thus, if two years are separated by a span that is a multiple of 60, then they will have the same year name. Indeed, notice that Avitohol and Irnik have the same year, and they are separated by 300 years. Likewise Kurt and Bezmer, who are separated by 60 years, have the same year name (as long as vem = vechem).
Irnik and Gostun are separated by 150 years, which is a multiple of 5 and 10, but not of 12. Notice that the second part of their year names is the same, but the first part is different, implying that the first part belongs to the cycle of 12, and the second part to the cycle of 5 or 10.
Outside of the Nominalia, there is an inscription called the Chatalar Inscription that gives the same date in the Bulgar calendar and the Byzantine calendar. Based on this inscription, the year 821 was a sigor elem year. This was a "white ox" year, "iron ox" year, or 丑辛 year.
We really only have five distinct values for the second part of the year name, so we can work them out as follows. (Note 1/26/2014--I have edited this post, since it contained mistakes that were corrected in a later post that no one ever looks at).
Start with the Chatalar inscription, which has the year 821 in the Byzantine calendar, and sigor elem in the Bulgar calendar:
sigor, ox
elem, metal | white
Telets was defeated by the Byzantines in battle at Anchialus in 763. If he reigned for three years, then somor altem, when he took the throne, must be on or after 760. If altem = alem = elem, then that narrows it down to 760 or 761. As it happens, 761 was also an Ox year, and we know Ox was not somor, so we'll say he took power in 760:
somor, rat
altem, metal | white
Umor took the throne after Telets, so 763 or 764. There are some caveats here: nomadic empires tended to choose their leaders by council (thus explaining why the different kings came from different clans), but also a new leader could not be chosen until the council had a chance to meet. Not only that, but the first year of a reign was usually recorded as the first new year after taking power. For now, let's be fuzzy about Umor's year:
dilom, rabbit (33%) / dragon (33%) / snake (33%)
toutom, water | black (33%) / wood | green (66%)
The reigns from Avitohol to Bezmer are partially legendary, so we can probably assume that the years and reigns make sense in the legendary context, even if we can't really tie them to historical events. If there were two years from Gostun to Kurt, and Kurt took power in an Ox year (šegor večem), then Gostun must have taken power in a Boar year, so:
dohs, boar
Irnik's legendary 150-year rule would have started, then, in a Snake year (dilom tverim). That settles the question about Umor's reign, which must have started in the Wood Snake year 765, so we can say:
dilom, snake
toutom, wood | green
If we assume Gostun's vtirem is a mistake for tvirem (which it should be based on the legendary reign lengths), then we know that tvirem and večem must be adjacent in the cycle of elements. The cycle is Fire, Earth, Metal, Water, Wood, and we've already identified Metal and Wood, so the only adjacent unknowns are Fire and Earth. That means:
tvirem, fire | red
večem, earth | yellow
And, by process of elimination, the remaining unknown element must be Water.
Tervel is fairly well-documented, being first mentioned in 704, and last mentioned by Theophanes the Confessor in 718 or 719. If he ruled for 21 years, then there is no way that he could have taken power in a Water year (692-693 or 702-703). Despite the fact that tvirem looks like a king name based on the format of the list, it seems more likely to be part of Tervel's year, and that the name of the king after Tervel is simply missing. In that case, Tervel could have taken power in the Fire Rooster year of 697 and ruled for 21 years till 718, so:
tekučitem, rooster
Between Tervel and Telets (718-760) there are around 42 years. This is best accounted for by assuming that there was no ruler between Tervel and Sevar. Sevar took power in a Metal year, so either the Monkey or Rooster years of 720-721. Since we already have Rooster, that leaves:
toh, monkey
Kormisosh must have taken power in the Fire Ox year (šegor tvirem) 737, accommodating the 15 years of the reign of Sevar and a couple years of interregnum. From 737 till 760 there are 23 years to accommodate the 17-year reign of Kormisosh and the 7-year reign of Vinekh. There is no way to read Vinekh's year as a šegor alem year, since those fell on 701 and 761. Reluctantly, we must follow the text, and say that imaše goralem is most likely the Water Dragon year of 752
imaše, dragon
goralem, water | black
This is unsatisfying, because it leaves unexplained the fact that imaše goralem could also be parsed as ima šegor alem, so we should consider this tentative.
That leaves the vereni alem of Asparukh's reign. Asparukh reached the Danube around 674-678, and Tervel took power in 697. If we believe the 61-year reign, then this should either be the Tiger or Rabbit years of 630-631.
Some of these words have apparent Turkic reflexes (definitions below taken from Clauson):
altem, alem, elem, metal | white; compare Old Turkic altu:n, gold
dohs, boar; compare Old Turkic toŋuz, 'pig'
dilom, snake; compare Old Turkic yıla:n (< dıla:n), 'snake'
tekučitem, rooster; compare Old Turkic takı:ǧu:, 'domestic fowl'
That leaves the vereni alem of Asparukh's reign. Asparukh reached the Danube around 674-678, and Tervel took power in 697. If we believe the 61-year reign, then this should either be the Tiger or Rabbit years of 630-631.
Some of these words have apparent Turkic reflexes (definitions below taken from Clauson):
altem, alem, elem, metal | white; compare Old Turkic altu:n, gold
dohs, boar; compare Old Turkic toŋuz, 'pig'
dilom, snake; compare Old Turkic yıla:n (< dıla:n), 'snake'
tekučitem, rooster; compare Old Turkic takı:ǧu:, 'domestic fowl'
East/West
In the Ili valley of Xinjiang province, in China, there is an ethnic group called the Sibe, who speak a dialect of Manchu, and use a form of the Classical Manchu language as their written language.
One of the odd differences between Sibe and Manchu is that their words for East and West are reversed. The Manchu words for East and West are (respectively) dergi and wargi, while the Sibe words are vɛrɣi and dirɣi. (They're reversed...trust me).
As far as I know, no one has ever explained this. It is generally assumed that the Manchu words originally referred to the rising and setting of the sun. So, for example, dergi, "East", is related to words like dekde-, "rise", deye-, "fly", desi, "upward"; while wargi, "West", is related to words like wasi, "downward", wasihūn, "low", etc.
But then why are they reversed in Sibe? The sun surely rises and sets the same for the Sibe as for the Manchus.
The Manchu language is based on the language of Nurhaci and his people, who lived on the Suksuhu river. It is probably a sister to the Sibe language, both being dialects of Jurchen. The Sibe do not consider themselves Manchus, and they did not come from the Suksuhu river area, they lived along the Amur river.
Guess what? The Suksuhu river runs West, and the Amur river runs East. If dergi and wargi originally meant "upstream" and "downstream", then that would explain why they are now reversed in Sibe and Manchu.
One of the odd differences between Sibe and Manchu is that their words for East and West are reversed. The Manchu words for East and West are (respectively) dergi and wargi, while the Sibe words are vɛrɣi and dirɣi. (They're reversed...trust me).
As far as I know, no one has ever explained this. It is generally assumed that the Manchu words originally referred to the rising and setting of the sun. So, for example, dergi, "East", is related to words like dekde-, "rise", deye-, "fly", desi, "upward"; while wargi, "West", is related to words like wasi, "downward", wasihūn, "low", etc.
But then why are they reversed in Sibe? The sun surely rises and sets the same for the Sibe as for the Manchus.
The Manchu language is based on the language of Nurhaci and his people, who lived on the Suksuhu river. It is probably a sister to the Sibe language, both being dialects of Jurchen. The Sibe do not consider themselves Manchus, and they did not come from the Suksuhu river area, they lived along the Amur river.
Guess what? The Suksuhu river runs West, and the Amur river runs East. If dergi and wargi originally meant "upstream" and "downstream", then that would explain why they are now reversed in Sibe and Manchu.
Sunday, July 7, 2013
Secret envelopes and distributed message transmission
(Note--I've edited this after thinking about the technical issues a bit)
When a message moves across a communication network, normally it has an "envelope" containing address information and metadata about the message necessary for its delivery. For a letter that is physically mailed, the envelope is the physical envelope. For a TCP/IP packet, the envelope is a packet header. For email, it is the SMTP header...you get the picture.
When a message moves across a communication network, normally it has an "envelope" containing address information and metadata about the message necessary for its delivery. For a letter that is physically mailed, the envelope is the physical envelope. For a TCP/IP packet, the envelope is a packet header. For email, it is the SMTP header...you get the picture.
Even if the content of the envelope is secret, a great deal of information can be gathered from analysis of the envelopes, which are generally unencrypted so the message can be transmitted efficiently. But what if you wanted to keep the envelope secret, too?
It seems to me there are a small number of key ingredients to any system that could transmit messages and keep the recipient secret:
1. The "address" must be something that only the recipient would recognize. One approach would be for the recipient to provide a public key, and for the address to consist of a block of mostly random data with some unique property, encrypted using the public key. For example, the block of data could be 256 bytes long, and consist of the byte values 0x00 - 0xFF in a random order.
2. Messages must be distributed broadly, and should pass through many hands.
The upshot is that you exchange efficiency in transmission for anonymity. I wonder if there is an equation that would say how inefficient the transmission system needs to be in order to guarantee a certain amount of anonymity.
1. The "address" must be something that only the recipient would recognize. One approach would be for the recipient to provide a public key, and for the address to consist of a block of mostly random data with some unique property, encrypted using the public key. For example, the block of data could be 256 bytes long, and consist of the byte values 0x00 - 0xFF in a random order.
2. Messages must be distributed broadly, and should pass through many hands.
The upshot is that you exchange efficiency in transmission for anonymity. I wonder if there is an equation that would say how inefficient the transmission system needs to be in order to guarantee a certain amount of anonymity.
Subscribe to:
Posts (Atom)