Loading Pyodide. Text boxes disabled until ready.
1. Paste a CSV. The table will be called
data
a,b,c,d,e,f,g 0,0,0,0,a,2,c 1,1,1,0,b,4,d 2,2,0,0,c,6,e 3,3,1,0,d,8,cde 4,4,0,0,abc,10,a 5,0,1,0,cde,12,b 6,1,0,0,a,14,c 7,2,1,0,b,16,abc 8,3,0,0,c,18,c 9,4,1,0,d,20,d 10,0,0,0,abc,22,e 11,1,1,0,cde,24,cde 12,2,0,0,a,26,a 13,3,1,0,b,28,b 14,4,0,0,c,30,c 15,0,1,0,d,32,abc 16,1,0,0,abc,34,c 17,2,1,0,cde,36,d 18,3,0,0,a,38,e 19,4,1,0,b,40,cde
2. Write SQL query
SELECT a, sum(b+2) * 2 as c FROM data, (SELECT 1 as x FROM data) AS d2 WHERE data.a = d2.x GROUP BY a
Translate
Generated Pandas Code


[gecode-users] Analysing search performance
Lars Otten
ottenl at student.chalmers.se
Wed Mar 1 17:52:40 CET 2006
Hi all,
On 02/28/06 09:01, Christian Schulte wrote:
> For the time being, the only support you can get is by using a standard C++
> profiler. If you are using gcc for compiling just use gprof the see what is
> happening. In order to compiler for gprog you have to give -pg as option for
> gcc (just check the gcc doc).
Thanks to Guido and you for the hints. I did some reading about profiling:
The problem with gprof is that it only profiles the main executable but not
shared libraries -- or if it does, it's so cumbersome I couldn't get it to
work...
After some searching I came across oprofile [2] which seems to do the job
quite nicely, eve without any special compilation flags. I attach the first
few lines of the (filtered) system-wide profile of running my program for
some minutes. It seems that most of the time is spent cloning spaces,
specifically in Gecode::ViewArray<...>::update(...)
This is (percentage-wise) a lot more than what I get when I run e.g.
$ queens -c_d 1 -solutions 0 -mode stat
for some minutes, but then again it's a different problem so this comparison
might not mean much.
> Did you at least check the search space? That is, how big is the search tree
> with what you have and how big is that in [1]. If you are talking vastly
> different trees there is no point in alayzing performance but your model.
The underlying model I employ is (almost) the exact same as in [1], so in
principle the search trees should be very similar. I'm also using (almost)
the same variable/value selection heuristics. I just left out some more
complicated constraints, but I feel that shouldn't make such a difference
(rather it should make the problem easier).
Nevertheless I will talk to Mattias, the author of [1], to find out if there
are any major discrepancies I might not be aware of.
I will also migrate my changes to the fresh version 1.0.1, although the
changelog does not contain anything I'd relate to my observations.
Cheers,
/Lars
[1] http://publications.lib.chalmers.se/records/full_record/6207.html
[2] http://oprofile.sf.net/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: prof.txt
URL: <http://www.ps.uni-sb.de/pipermail/users/attachments/20060301/e655ba27/attachment.txt>
More information about the gecode-users
mailing list


The Garden of Silver Breezes was not a garden at all but a huge wineshop, much too large to be called a shop really, atop a hill centered on the Calpene, the westernmost of Tanchico’s three peninsulas below the Great Circle. A part of the name, at least, came from the breezes that wafted in where polished green-streaked marble columns and balustrades replaced one wall except on the topmost floor. Golden oiled-silk curtains could be lowered in case of rain. The hill fell away sharply on that side, and the tables along the balustrades gave a clear view, across white domes and spires, of the great harbor, crowded with more ships than ever. Tanchico needed everything, desperately, and there was gold to be made—until the gold and time ran out.
With its gilded lamps and ceilings inlaid with brass fretwork polished to a golden gleam, its serving women and men chosen for grace and beauty and discretion, the Garden of the Silver Breezes had been the most expensive wineshop in the city even before the troubles. Now it was outrageous. But those who dealt in huge sums still came, those who dealt in power and influence, or thought they did. In some ways there was less to deal in than before; in others, more.
Low walls surrounded each table, making islands dotted across the green and golden floor tiles. Each wall, pierced with lacy carving so no eavesdropper could listen unseen, stood just high enough to hide who met whom from the casual glances of passersby. Even so, patrons usually went masked, especially of late, and some had a bodyguard beside their table, also masked to avoid recognition if the patron was prudent. And tongueless, rumor said, for the most prudent. No guard was visibly armed; the proprietress of the Garden of Silver Breezes, a sleek woman of indeterminate age named Selindrin, allowed no weapons past the street now. Her rule was not broken, at least openly.
From her usual table against the balustrade, Egeanin watched the ships in the harbor, especially those under sail. They made her want to be back on a deck giving orders. She had never expected duty to bring her to this.
Unconsciously she adjusted the velvet mask that hid the upper half of her face; she felt ridiculous wearing the thing, but it was necessary to blend in to some extent. The mask—blue to match her high-necked silk gown—the gown itself, and her dark hair, grown down to her shoulders now, were as far as she could make herself go. Passing for a Taraboner was unnecessary—Tanchico bulged with refugees, a good many of them foreigners swept up in the troubles—and it was beyond her in any case. These people were animals; they had no discipline, no order.
Regretfully, she turned from the harbor to her table companion, a narrow-faced fellow with a weasel’s greedy smile. Floran Gelb’s frayed collar did not belong in the Garden of Silver Breezes, and he continually wiped his hands on his coat. She always met them here, the greasy little men she was forced to deal with. It was a reward for them, and a means of keeping them off balance.
“What do you have for me, Master Gelb?”
Wiping his hands again, he lifted a coarse jute bag onto the table and watched her anxiously. She held the bag down beside her before opening it. A silvery metal a’dam lay inside, a collar and bracelet connected by a leash cunningly worked and joined. She closed the bag and set it on the floor. This made three that Gelb had recovered, more than anyone else.
“Very good, Master Gelb.” A small purse went across the table the other way; Gelb made it disappear under his coat as if it held the Empress’s crown instead of a handful of silver. “And do you have anything else?”
“Those women. The ones you want me to look for?” She had grown used to the quick speech of these people, but she wished he would not lick his lips that way. It did not make him any harder to understand, but it was unsightly.
She very nearly told him she was not interested anymore. But this was a part of why she was in Tanchico, after all; maybe the whole reason, now. “What of them?” That she could even think of shirking her duty made her speak more harshly than she had intended, and Gelb flinched.
“I . . . I think I’ve found another one.”
“You are sure? There have been . . . mistakes.”
Mistakes was a gentle way to put it. Near a dozen women who came only vaguely near the descriptions had been nuisances she could ignore once she had seen them. But that noblewoman, a refugee from estates burned out by the war. Gelb had kidnapped the woman off the street, thinking to earn more for delivering her than for telling where she was. In his defense, the Lady Leilwin closely matched one of the women Egeanin sought, but she had told him they would not speak with any accent he recognized, certainly not a Taraboner accent. Egeanin had not wanted to kill the woman, yet even in Tanchico someone might have listened to her story. Leilwin had gone bound and gagged onto one of the courier boats in the dead of night; she was young and pretty, and someone would find a better use for her than slitting her throat. But Egeanin was not in Tanchico to find serving girls for the Blood.
“No mistakes, Mistress Elidar,” he said hastily, flashing that smile full of teeth. “Not this time. But . . . I need a little gold. To be sure. To get close enough. Four or five crowns?”
“I pay for results,” Egeanin told him firmly.
Gelb licked his lips nervously. “You said . . . Back in the beginning, you said you’d have a few coins for those as could do special sorts of work.” A muscle in his cheek twitched; his eyes darted as if someone might be listening at the lace-carved wall around three sides of the table, and his voice dropped to a hoarse whisper. “Stirring up trouble, as it were? I heard a rumor—from a fellow who’s body-servant to Lord Brys—about the Assembly, and choosing the new Panarch. I think maybe it’s true. The man was drunk, and when he realized what he had said, he nearly fouled himself. Even if it isn’t, it would still rip Tanchico wide open.”
“Do you really believe there is any need to buy trouble in this city?” Tanchico was a rotting bellfruit ready to fall in the first wind. The whole of this wretched land was. For a moment she was tempted to buy his “rumor.” She was supposed to be a trader in whatever goods or information came along, and she had even sold some. But dealing with Gelb sickened her. And her own doubts frightened her. “That will be all, Master Gelb. You know how to make contact with me if you find another of these.” She touched the rough-woven sack.
Instead of rising, he sat staring, trying to see through her mask. “Where are you from, Mistress Elidar?  Maybe it was the quarterdeck voice, or maybe the mask failed to hide her cold stare, but Gelb bounced to his feet, ducking bows and stammering apologies while he fumbled open the door in the lacework wall.
She sat there after he was gone, giving him time to leave the Garden of Silver Breezes. Someone would follow him outside, to make certain he did not wait to shadow her.
A new ship was sweeping into the harbor below, a Sea Folk raker with its towering masts and clouds of sail. She had examined a captured raker, but she would have given almost anything to take one out, though she expected a Sea Folk crew would be necessary to wring the most from the vessel. The Atha’an Miere were stubborn about taking the oaths; it would not be as good if she had to buy a crew. Buy an entire crew! The amount of gold that came in by the courier boats for her to fling about was going to her head.
Taking up the jute bag, she started to rise, then sat back down hurriedly at the sight of a wide, thick-shouldered man leaving another table. Dark hair, long to his shoulders, and a beard that left his upper lip bare framed Bayle Domon’s round face. He was not masked, of course; he ran a dozen coasting vessels in and out of Tanchico and apparently did not care who knew his whereabouts. Masked. She was not thinking straight. He would not recognize her in a mask. Still, she waited until he was gone before leaving her table. The man might have to be dealt with yet, if he became a danger.
Selindrin took the gold she proffered with a sleek smile and murmured wishes for Egeanin’s continued patronage. Dark hair in dozens of narrow braids, the proprietress of the Garden of Silver Breezes wore clinging white silk, nearly thin enough for a serving girl, and one of those transparent veils that always made Egeanin want to ask Taraboners what dances they could perform. Shea dancers wore almost identical veils and little more. Still, Egeanin thought as she started toward the street, the woman had a sharp mind, else she could not maneuver through the shoals of Tanchico, catering to every faction while earning the enmity of none.
A reminder of that was the tall, white-cloaked man, gray at the temples but hard-faced and hard-eyed, who passed Egeanin and was greeted by Selindrin. Jaichim Carridin’s cloak bore a golden sunburst on the breast, with four golden knots below and a crimson shepherd’s crook behind. An Inquisitor of the Hand of the Light, a high officer in the Children of the Light. The very concept of the Children outraged Egeanin, a military body answerable only to itself. But Carridin and his few hundred soldiers had power of a sort in Tanchico, where any kind of authority seemed to be lacking most of the time. The Civil Watch no longer patrolled the streets, and the army—as much as was still loyal to the King—was too busy holding the fortresses around the city. Egeanin noted that Selindrin did not even glance at the sword on Carridin’s hip. He definitely had power.
As soon as she stepped into the street her bearers came running with her chair from the cluster waiting for their patrons, and her bodyguards closed in around her with their spears. They were a mismatched lot, some in steel caps, three wearing leather shirts sewn with steel scales; rough-faced men, possibly deserters from the army, but aware that continued full bellies and silver to spend depended on her continued safety. Even the bearers carried stout knives, and cudgels stuck out of their sashes. No one who looked as though they had money dared appear out-of-doors unguarded. In any case, had she cared to risk it, it would only draw attention to her.
The guards forced a way through the crowds with no trouble. The throngs eddied and swirled in the narrow streets that wound through the city’s hills, creating clear pockets around sedan chairs surrounded by bodyguards. There were very few carriages to be seen. Horses were becoming an extravagance.
Worn was the only fit description for the milling masses, worn and frenzied. Worn faces, worn clothes, and too-bright, frenzied eyes, desperate, hoping when they knew there was no hope. Many had surrendered, crouching against walls, huddled in doorways, clutching wives, husbands, children, not simply worn but ragged and blank-faced.
Egeanin kept her eyes straight ahead, of necessity trusting the bodyguards to detect any danger. Meeting a beggar’s eyes meant twenty of them jamming themselves hopefully around her chair. Tossing a coin meant a hundred crowding in, clamoring and weeping. She was already using part of the money the courier boats brought to support a soup kitchen, just as if she were one of the Blood. She shuddered to think what discovery of that overstepping of her place would mean. As well put on a brocaded robe and shave her head.
All of this could be put aright once Tanchico fell, with everyone fed, everyone put in their proper place. And she could abandon dresses and things she had no experience or taste for, return to her ship. Tarabon, at least, and perhaps Arad Doman as well, were ready to crumble at a touch, like charred silk. Why was the High Lady Suroth holding back? Why?
Jaichim Carridin lounged in his chair, cloak spread over the carved arms, studying the Taraboner noblemen who occupied the private room’s other chairs. They sat stiffly in their gold-embroidered coats, mouths tight below masks fancifully worked to resemble hawks’ faces, and lions’ and leopards’. He had more to worry him than they, but he managed a calm demeanor. It was two months since he had received word of a cousin found skinned alive in his own bedchamber, three since his youngest sister, Dealda, being carried off from her bridal feast by a Myrddraal. The family steward wrote disbelievingly, frantic with all the tragedy befalling House Carridin. Two months. He hoped Dealda had died quickly. It was said women did not cling to sanity long in Myrddraal hands. Two whole months. Anyone else but Jaichim Carridin would have been sweating blood.
Each man held a golden goblet of wine, but there were no servants present. Selindrin had served them before removing herself with an assurance that they would not be disturbed. There was, in fact, no one else on this, the highest floor of the Garden of Silver Breezes. Two men who had come with the nobles—members of the King’s Life Guard, unless Carridin missed his guess—stood at the foot of the stairs to guarantee continued privacy.
Carridin sipped his wine. None of the Taraboners had touched theirs. “So,” he said lightly, “King Andric wishes the Children of the Light to aid in restoring order in the city. We do not often let ourselves become involved in the internal affairs of nations.” Not openly. “Certainly I cannot remember such a request. I do not know what the Lord Captain Commander will say.” Pedron Niall would say to do what was needed and make sure the Taraboners knew that they owed a debt to the Children, make sure they paid it in full.
“There is no time for you to request instructions from Amador,” a man in a black-spotted leopard mask said urgently. None had offered names, but Carridin did not need them.
“What we ask is necessary,” another snapped, his thick mustache below a hawk mask giving him the look of a peculiar owl. “You must understand that we would not make this request unless it were necessary in the extreme. We must have unity, not more division, yes? There are many divisive elements, even within Tanchico. They must be suppressed if there is to be even the hope of imposing peace on the countryside.”
“The death of the Panarch has made matters most difficult,” the first fellow added.
Carridin raised an eyebrow questioningly.
His own supposition was that Andric himself had had the deed done, in the belief that the Panarch favored one of the rebel claimants to the throne. The King may have been right, but he had discovered after calling what he could of the Assembly of Lords—a good many were with one or another of the rebel groups out in the country—that they were remarkably stubborn about ratifying his choice. Even had the Lady Amathera not been currently sharing Andric’s bed, election of King and Panarch was the only real power the Assembly had, and they did not seem to want to give it up. The difficulties over the Lady Amathera were not supposed to be known. Even the Assembly realized that that news might set off riots.
“One of the Dragonsworn madmen assuredly,” the owl-looking man said, giving his mustache a fierce tug. “No true Taraboner would harm the Panarch, yes?” He almost sounded as if he believed it.
“Of course,” Carridin said smoothly. He took another sip of wine. “If I am to secure the Panarch’s Palace for the ascension of the Lady Amathera, I must hear from the King himself. Otherwise, it might appear the Children of the Light were reaching for power in Tarabon, when all we seek is, as you say, an end to division, and peace under the Light.”
An older, square-jawed leopard, white streaking his dark yellow hair, spoke up in cold tones. “I have heard that Pedron Niall seeks unity against the Dragonsworn. Unity under himself, is it not?”
“The Lord Captain Commander seeks no dominion,” Carridin replied just as icily. “The Children serve the Light, as do all men of good will.”
“There can be no question,” the first leopard put in, “of Tarabon being subject in any way to Amador. No question!” Angry agreement rumbled from nearly every chair.
“Of course not,” Carridin said as though the thought had never crossed his mind. “If you wish my aid, I will give it—under the conditions I have stated. If you do not, there is always work for the Children. Service to the Light never ends, for the Shadow waits everywhere.”
“You will have sureties signed and sealed by the King,” a graying, lion-masked man said, the first words he had spoken. He was, of course, Andric himself, though Carridin was not supposed to know. The King could not meet with an Inquisitor of the Hand of the Light without causing talk any more than he could visit a wineshop, even the Garden of Silver Breezes.
Carridin nodded. “When they are in my hand, I will secure the Panarch’s Palace, and the Children will suppress any . . . divisive elements . . . who attempt to interfere with the investiture. Under the Light, I swear it.” Tension drained out of the Taraboners visibly; they upended their goblets as if trying to replace it with wine, even Andric.
So far as the people of Tarabon were concerned, the Children would have the blame for the inevitable killings, not the King, or the army of Tarabon. Once Amathera was invested with the Crown and Staff of the Tree, a few more of the Assembly might well join the rebels, but if the rest admitted they had not elected her the news would set Tanchico afire. As for any tales that came from those who fled—why, rebels would spread any sort of treasonous lie. And the King and Panarch of Tarabon would both dangle on strings Carridin could hand to Pedron Niall to do with as he pleased.
Not such a grand prize as it would have been when the King of Tarabon controlled more than a few hundred square miles around Tanchico, yet it might be grand again. With the aid of the Children—a legion or two would be needed at least; not just the five hundred men Carridin had—the Dragonsworn might yet be crushed, the various rebels defeated, even the war with Arad Doman successfully prosecuted. If either country still realized it was fighting the other. Arad Doman was in worse condition than Tarabon, so Carridin heard.
In truth, he hardly cared if Tarabon fell under the Children’s sway, or Tanchico, or any of it. There were motions to go through, things to do that he had always done, but it was difficult to think of anything except when his own throat would be cut. Perhaps he would long to have his throat cut. Two whole months since the last report.
He did not stay to drink with the Taraboners, but made his goodbyes, as shortly as he could. If they took offense, they needed him too much to show it. Selindrin saw him come down, and a stableboy was trotting his horse up to the front door when he reached the street. Tossing the boy a copper, he spurred the black gelding to a quick canter. The ragged folk in the twisty streets got out of his way, which was to the good; he was not sure he would notice if he trampled one of them. Not that it would be any loss. The city was full of beggars; he could hardly breathe without the stench of old, sour sweat and dirt. Tamrin ought to sweep them up and sweep them out; let the rebels in the country contend with them.
It was the country that held his mind, but not the rebels. They could be dealt with easily enough, after word began to spread that this one or that was a Darkfriend. And once he managed to turn a few of them over to the Hand of the Light, they would stand up before everyone and confess to worshipping the Dark One, eating children, anything and everything they were told. The rebels could not last long after that; the pretenders still in the field would wake to find themselves alone. But the Dragonsworn, the men and women who had actually declared for the Dragon Reborn, would not fall away for a charge of being Darkfriends. Most people already considered them so, swearing to follow a man who could channel.
It was the man they had sworn to follow who was the problem, the man whose name they did not even know. Rand al’Thor. Where was he? A hundred bands of Dragonsworn out there, at least two large enough to be called armies, fighting the King’s army—such of it as still held allegiance to Andric—fighting the rebels—who were busy fighting each other as often as Andric or the Dragonsworn—yet Carridin had no clue to which band sheltered Rand al’Thor. He could be on Almoth Plain or in Arad Doman, where the situation was the same. If he was, Jaichim Carridin was a dead man in all likelihood.
At the palace on the Verana he had commandeered for the Children’s headquarters, he tossed his reins to one of the white-cloaked guards and stalked inside without returning their salutes. The owner of this ornate mass of pale domes and lacy spires and shaded gardens had put forward a claim to the Throne of the Light, and no one complained at the occupation. Least of all the owner; what was left of his head still adorned a spike above the Traitors’ Steps, on the Maseta.
For once Carridin barely glanced at fine Tarabon carpets, or furnishings worked with gold and ivory, or fountained courts where splashing water made a cool sound. Broad hallways with golden lamps and high ceilings covered in delicate gold-work scrolls interested him not at all. This palace could match the finest in Amadicia, if not the largest, yet foremost in his mind right then was the strong brandy in the room he had taken for a study.
He was halfway across a priceless carpet, all patterned blue and scarlet and gold, eyes fixed on the carved cabinet that held a silver flask of double-distilled brandy, when suddenly he realized he was not alone. A woman in a clinging, pale-red gown stood near the tall, narrow windows overlooking one of the tree-shaded gardens, her honey-colored hair in braids that brushed her shoulders. A misty scrap of veil did nothing to hide her face. Young and pretty, with a rosebud mouth and large brown eyes, she was no servant, not dressed like that.
“Who are you?” he demanded irritably. “How did you get in here? Leave at once, or I’ll have you tossed into the street.”
“Threats, Bors? You should be more welcoming to a guest, yes?”
That name jolted him to his heels. Before he thought, he had his sword out, lunging for her throat.
Something seized him—the air turned to crawling jelly—something forced him to his knees, encased him from the neck down. It tightened around his wrist until bones grated; his hand popped open, and his sword fell. The Power. She was using the One Power on him. A Tar Valon witch. And if she knew that name . . .
“Do you remember,” she said, coming closer, “a meeting where Ba’alzamon himself appeared, and showed us the faces of Matrim Cauthon, and Perrin Aybara, and Rand al’Thor?” She practically spat the names, especially the last; her eyes could have drilled holes in steel. “You see? I know who you are, yes? You pledged your soul to the Great Lord of the Dark, Bors.” Her sudden laugh was a tinkling of bells.
Sweat popped out on his face. Not just a despised Tar Valon witch. Black Ajah. She was Black Ajah. He had thought it would be a Myrddraal that came for him. He had thought there was time yet. More time. Not yet.  “Rand al’Thor. I have tried! But I cannot find him. I cannot! I was told my family would be killed if I failed, one by one. I was promised I would be last! I have cousins, yet. Nephews. Nieces. I have another sister! You must give me more time!”
She stood there, watching him with those sharp brown eyes, smiling with that plump little mouth, listening to him spew out where Vanora could be found, where her bedchamber lay, how she liked to ride alone in the forest beyond Carmera. Perhaps if he shouted some of the guards would come. Perhaps they could kill her.  Nostrils flaring, he sucked air in frantically. He could still breathe, but he could not scream. All that came out were muffled groans, like a woman wailing behind walls. He wanted to scream.
“You are very amusing,” the honey-haired woman said finally. “Jaichim. That is a good name for a dog, I think. Would you like to be my dog, Jaichim?
It took a moment for what she was saying to sink in. If he was to see Rand al’Thor die, she was not . . .  Tears rolled down his face. Sobs of relief shook him, as much as he could shake, trapped as he was. That trap abruptly vanished, and he collapsed on hands and knees, still weeping. He could not stop.
 “Now you will listen to me, yes? The death of Rand al’Thor is for the future, and you will see it only if you are a good dog. You are going to move your Whitecloaks to the Panarch’s Palace.”
“H-how do y-you know that?”
She shook his head from side to side, not gently. “A good dog does not question his mistress.  I say kill; you kill. Yes? Yes.” Her smile was just a flash of teeth. “There will be difficulty in taking the Palace? The Panarch’s Legion is there, a thousand men, sleeping in the hallways, the exhibition rooms, the courtyards. You do not have so many of your Whitecloaks.”
“They . . . ” He had to stop and swallow. “They will make no trouble. They will believe Amathera has been chosen by the Assembly. It is the Assembly that—”
“Do not bore me, Jaichim.  When will you move?”
“It . . . it will take three or four days for Andric to deliver sureties.”
“Three or four days,” she murmured half to herself. “Very well. A little longer delay should cause no harm.” He was wondering what delay she meant when she cut away the little ground remaining under his feet. “You will keep control of the Palace, and you will send the Panarch’s fine soldiers away.”
“That is impossible,” he gasped, and she jerked his head back so hard he did not know if his neck would break or his scalp tear loose first. He did not dare resist. A thousand invisible needles pricked him, on his face, his chest, his back, arms, legs, everywhere. Invisible, but he was sure no less real for that.
“Impossible, Jaichim?” she said softly. “Impossible is a word I do not like to hear.”
The needles twisted deeper; he groaned, but he had to explain. What she wanted was impossible. He panted with haste. “Once Amathera is invested as Panarch, she will control the Legion. If I try to hold the Palace, she will turn them on me, and Andric will help her. There is no way I can hold against the Panarch’s Legion, and against whatever Andric can strip from the Ring forts.”
She studied him so long he began to sweat. He did not dare to flinch, hardly even to blink; those thousand biting little stabs did not allow it.
“The Panarch will be dealt with,” she said finally. The needles vanished, and she stood.
Carridin stood, too, trying to steady himself. Perhaps some bargain could be reached; the woman seemed willing to listen to reason now. His legs quivered with shock, but he made his voice as firm as he could.  “I told you not to question, Jaichim. A good dog obeys his mistress, yes? I promise you, if you do not you will beg me to find a Myrddraal to play with you. Do you understand me?”
“I understand,” he said leadenly. She continued to stare, and after a moment he did understand. “I will do as you say . . . mistress.” Her brief, approving smile made him flush. She moved toward the door, turning her back on him as if he really were a dog, and a toothless one. “What . . . ? What is your name?”
Her smile was sweet this time, and mocking. “Yes. A dog should know his mistress’s name. I am called Liandrin. But that name must never touch a dog’s lips. Should it, I will be most displeased with you.”
When the door closed behind her, he staggered to a high-backed chair inlaid with ivory and fell into it. The brandy he left where it was; the way his stomach was twisting, it would make him vomit. What interest could she possibly have in the Panarch’s Palace? A dangerous line of questioning, perhaps, but even if they served the same master he could not feel anything but revulsion for a Tar Valon witch.
She did not know as much as she thought. With the King’s sureties in hand, he could keep Tamrin and the army away from his throat with the threat of revelation, and Amathera, too. They could still rouse the mob, though. And the Lord Captain Commander might be more than disapproving of the entire affair, might believe he was reaching for personal power.  His own men would arrest him; and hang him. If he could arrange the death of the witch . . . But she had promised to protect him from the Myrddraal. He wanted to weep again. She was not even here, yet she had him trapped as tightly as ever, steel jaws clamped on both legs and a noose snug around his neck.
There had to be a way out, but every way he looked there was only another trap.
Liandrin ghosted through the halls, easily avoiding servants and Whitecloaks. When she stepped out of a small back door into a narrow alley behind the palace, the tall young guard there stared at her with a blend of relief and unease. Her little trick of opening someone to her suggestions—just a whip-crack trickle of the Power—had not been needed with Carridin, but it had easily convinced this fool that she should be allowed in. Smiling, she motioned him to bend closer. The lanky lout grinned as if expecting a kiss, a grin that froze as her narrow blade went through his eye.
 He would not speak of her even by accident now. Not so much as a spot of blood stained her hand. She wished she had Chesmal’s skill at killing with the Power, or even Rianna’s lesser talent. Strange that the ability to kill with the Power, to stop a heart or boil blood in the veins, should be so closely linked to Healing. She herself could not Heal much more than scrapes or bruises; not that she had any interest in it.
Her sedan chair, red-lacquered and inlaid with ivory and gold, was waiting at the end of the alley, and with it her bodyguards, a dozen big men with faces like starving wolves. Once in the streets, they cleared a path through the crowds with ease, spears clubbing any not quick enough to move aside. They were all dedicated to the Great Lord of the Dark, of course, and if they did not know exactly who she was, they knew that other men had disappeared, men who failed to serve properly.
The house she and the others had taken, two sprawling stories of flat-roofed stone and white plaster on a hillside at the base of the Verana, Tanchico’s easternmost peninsula, belonged to a merchant who had also sworn his oaths to the Great Lord. Liandrin would have preferred a palace—one day perhaps she would have the King’s Palace on the Maseta; she had grown up staring enviously at the Lords’ palaces, but why should she settle for one of them?—yet despite her preferences, it made sense to stay hidden awhile yet. There was no way the fools in Tar Valon could suspect they were in Tarabon, but the Tower was surely still hunting them, and Siuan Sanche’s pets could be sniffing anywhere.
Gates gave onto a small courtyard, windowless except on the upper floor. Leaving the guards and bearers there, she hurried inside. The merchant had furnished a few servants; all sworn to the Great Lord, he assured them, but barely enough to provide for eleven women who rarely stirred outside. One, a sturdily handsome, dark-braided woman called Gyldin, was sweeping the entry hall’s red and white tiles when Liandrin entered.
“Where are the others?” she demanded.
“In the front withdrawing room.” Gyldin gestured to the double-arched doors to the right as though Liandrin might not know where that was.
Liandrin’s mouth tightened. The woman did not curtsy; she used no titles of respect. True, she did not know who Liandrin really was, but Gyldin certainly knew she was high enough to give orders and be obeyed, to send that fat merchant bowing and scraping and bundling his family off to some hovel. “You are supposed to be cleaning, yes? Not standing about? Well, clean! There is dust everywhere.  She clamped her teeth shut. She had copied the manner in which nobles and the wealthy spoke for so long that sometimes she forgot her father had sold fruit from a barrow, yet in one moment of anger the speech of a commoner rolled off her tongue. Too much stress. Too much waiting. With a last, snapped, “Work!” she pushed into the withdrawing room and slammed the door behind her.
The others were not all there, which irritated her even more, but enough. Round-faced Eldrith Jhondar, seated at a lapis-inlaid table beneath a hanging on one white-plastered wall, was making careful notes from a tattered manuscript; sometimes she absently cleaned the nib of her pen on the sleeve of her dark wool dress. Marillin Gemalphin sat beside one of the narrow windows, blue eyes dreamily staring out at the tiny fountain tinkling in a little courtyard, idly scratching the ears of a scrawny yellow cat and apparently unaware of the hairs it shed all over her green silk dress. She and Eldrith were both Browns, but if Marillin ever found out that Eldrith was the reason the stray cats she brought in continually disappeared, there would be trouble.
They had been Browns. Sometimes it was difficult to remember they no longer were, or that she herself was no longer a Red. So much of what had marked them clearly as members of their old Ajahs remained even now that they were openly pledged to the Black. Take the two former Greens. Coppery-skinned, swan-necked Jeaine Caide wore the thinnest, most clinging silk dresses she could find—white, today—and laughed that the gowns would have to do, since there was nothing available in Tarabon to catch a man’s eye. Jeaine was from Arad Doman; Domani women were infamous for their scandalous clothes. Asne Zeramene, with her dark, tilted eyes and bold nose, looked almost demure in pale gray, plainly cut and high-necked, but Liandrin had heard her regret leaving her Warders behind more than once. And as for Rianna Andomeran . . .
“It is done,” Liandrin announced. “Jaichim Carridin will move his Whitecloaks to the Panarch’s Palace and hold it for us. He does not yet know we will have guests . . . of course.” There were a few grimaces; changing Ajahs had certainly not altered anyone’s feelings toward men who hated women who could channel. “There is an interesting thing. He believed I was there to kill him. For failing to kill Rand al’Thor.”
“That makes no sense,” Asne said, frowning.  She laughed suddenly, soft and low, and leaned back in her chair. “If there is a way to control him, I would not mind binding him to me. He is a good-looking young man, from the little I saw.” Liandrin sniffed; she had no liking for men at all.
Rianna shook her head worriedly. “It makes troubling sense. Our orders from the Tower were clear, yet it is also clear that Carridin has others. I can only postulate dissension among the Forsaken.”
“The Forsaken,” Jeaine muttered, folding her arms tightly; thin white silk molded her breasts even more revealingly. “What good are promises that we will rule the world when the Great Lord returns if we are crushed between warring Forsaken first? Does anyone believe we could stand against any of them?”
“Balefire.” Asne looked around, dark tilted eyes challenging. “Balefire will destroy even one of the Forsaken. And we have the means to produce it.” One of the ter’angreal they had removed from the Tower, a fluted black rod a pace long, had that use. None of them knew why they had been ordered to take it, not even Liandrin herself. Too many of the ter’angreal were like that, taken because they had been told to, with no reasons given, but some orders had to be obeyed. Liandrin wished they had been able to secure even one angreal.
Jeaine gave a sharp sniff. “If any of us could control it. Or have you forgotten that the one test we dared nearly killed me? And burned a hole through both sides of the ship before I could stop it? Fine good it would have done us to drown before reaching Tanchico.”
“What need have we of balefire?” Liandrin said. “If we can control the Dragon Reborn, let the Forsaken think how they will deal with us.” Suddenly she became aware of another presence in the room. The woman Gyldin, wiping down a carved, low-backed chair in one corner. “What are you doing here, woman?”
“Cleaning.” The dark-braided woman straightened unconcernedly. “You told me to clean.”
Liandrin almost struck out with the Power. Almost. But Gyldin certainly did not know they were Aes Sedai. How much had the woman heard? Nothing of importance. “You will go to the cook,” she said in a cold fury, “and tell him he is to strap you. Very hard!  Again. The woman had made her speak like a commoner again.
Marillin stood, nuzzling the yellow cat’s nose with hers, and handed the creature to Gyldin. “See that he gets a dish of cream when the cook is done with you. And some of that nice lamb. Cut it small for him; he doesn’t have many teeth left, poor thing.” Gyldin looked at her, not blinking, and she added, “Is there something you don’t understand?”
“I understand.” Gyldin’s mouth was tight. Perhaps she did finally understand; she was a servant, not their equal.
Liandrin waited a moment after she left, the cat cradled in her arms, then snatched open one of the doors. The, entry hall was empty. Gyldin was not eavesdropping. She did not trust the woman. But then, she could not think of anyone she did trust.
“We must be concerned with what concerns us,” she said tightly, closing the door. “Eldrith, have you found a new clue in those pages? Eldrith?”
The plump woman gave a start, then stared around at them, blinking. It was the first time she had raised her head from the battered yellow manuscript; she seemed surprised to see Liandrin. “What? Clue? Oh. No. It is difficult enough getting into the King’s Library; if I extracted so much as a page, the librarians would know it immediately. But if I disposed of them, I would never find anything. That place is a maze. No, I found this in a bookseller’s near the King’s Palace. It is an interesting treatise on—”
Embracing saidar, Liandrin sent the pages showering across the floor. “Unless they are a treatise on the controlling of Rand al’Thor, let them be burned! What have you learned about what we seek?”
Eldrith blinked at the scattered papers. “Well, it is in the Panarch’s Palace.”
“You learned that two days ago,”
“And it must be a ter’angreal. To control someone who can channel must require the Power, and since it is a specialized use that means a ter’angreal. We will find it in the exhibition room, or perhaps among the Panarch’s collection.”
“Something new, Eldrith.” With an effort Liandrin made her voice less shrill. “Have you found anything that is new? Anything?”
The round-faced woman blinked uncertainly. “Actually . . . No.”
“It does not matter,” Marillin said. “In a few days, once they have invested their precious Panarch, we can begin searching, and if we must inspect every candlestick, we will find it. We are on the brink, Liandrin. We will put Rand al’Thor on a leash and teach him to sit up and roll over.”
“Oh, yes,” Eldrith said, smiling happily. “On a leash.”
Liandrin hoped it was so. She was tired of waiting, tired of hiding. Let the world know her. Let people bend knee as had been promised when she first forswore old oaths for new.
Egeanin knew she was not alone as soon as she stepped into her small house by the kitchen door, but she dropped her mask and the jute bag carelessly on the table and walked over to where a bucket of water stood beside the brick fireplace. As she bent to take the copper ladle, her right hand darted into a low hollow where two bricks had been removed behind the bucket; she spun erect, a small crossbow in her hand. No more than a foot long, it had little power or range, but she always kept it drawn, and the dark stain tipping the sharp steel bolt would kill in a heartbeat.
If the man leaning casually in the corner saw the crossbow, he gave no outward sign. He was pale-haired and blue-eyed, in his middle years, and good-looking if too slender for her taste. Clearly he had watched her cross the narrow yard through the iron-grilled window beside him. “Do you think that I threaten you?” he said after a moment.
She recognized the familiar accents of home, but she did not lower the crossbow. “Who are you?”
For answer he dipped two fingers carefully into his belt pouch—apparently he could see after all—and brought out something small and flat. She motioned him to lay it on the table and back up again.
Only after he was back in the corner did she move close enough to pick up what he had set there. Never taking her eyes or the crossbow away from him, she lifted it up where she could see. A small ivory plaque bordered in gold, engraved with a raven and a tower. The raven’s eyes were black sapphires. A raven, symbol of the Imperial family; the Tower of Ravens, symbol of Imperial justice.
“Normally this would be enough,” she told him, “but we are far from Seanchan, in a land where the bizarre is almost commonplace. What other proof can you offer?”
Smiling with silent amusement, he removed his coat, unlaced his shirt and stripped it off. On either shoulder was the tattoo of raven and tower.
Most Seekers for Truth bore the ravens as well as the tower, but not even someone who dared steal a Seeker’s plaque would have himself marked so. To wear the ravens was to be the property of the Imperial family. There was an old story of a fool young lord and lady who had themselves tattooed while drunk, some three hundred years gone. When the then Empress learned of it, she had them brought to the Court of the Nine Moons and set to scrubbing floors. This fellow might be one of their descendants. The mark of the raven was forever.
“My apologies, Seeker,” she said, setting the crossbow down. “Why are you here?” She did not ask a name; any he gave might or might not be his.
He left her holding the plaque while he re-dressed himself in a leisurely manner. A subtle reminder. She was a captain and he property, but he was also a Seeker, and under the law he could have her put to the question on his own authority. By law he had the right to send her out to buy the rope to bind her while he put her to the question right here, and he would expect her to return with it. Flight from a Seeker was a crime. Refusal to cooperate with a Seeker was a crime. She had never in her life considered any criminal act, no more than she had considered treason against the Crystal Throne. But if he asked the wrong questions, demanded the wrong answers . . . The crossbow was still close to her hand, and Cantorin was far away. Wild thoughts. Dangerous thoughts.
“I serve the High Lady Suroth and the Corenne, for the Empress,” he said. “I am checking on the progress of the agents the High Lady has placed in these lands.”
Checking? What had to be checked, and by a Seeker? “I have heard nothing of this from the courier boats.” His smile deepened, and she flushed. Of course the crews would not speak of a Seeker. Yet he answered while lacing up his shirt.
“The courier boats are not to be risked with my trips. I have taken passage on the vessels of a local smuggler, a man called Bayle Domon. His craft stop everywhere in Tarabon and Arad Doman and between.”
“I have heard of him,” she said calmly. “All goes well?”
“It does now. I am glad that you, at least, understood your instructions properly. Among the others, only the Seekers did. It is regrettable that there are not more Seekers with the Hailene.” Settling his coat on his shoulders, he plucked the Seeker’s plaque from her hand. “There has been some embarrassment over the return of sul’dam deserters. Such desertions must not become common knowledge. Much better that they simply vanish.”
Only because she had a little time to think was she able to keep her face smooth. Sul’dam had been left behind in the debacle at Falme, she had been told. Possibly some had deserted. Her instruction, delivered by the High Lady Suroth herself, had been to return any who could be found, whether they wanted to return or not, and if that was not possible, dispose of them. The last had seemed only a final alternative. Until now.
“I regret that these lands do not know kaf,” he said, taking a seat at the table. “Even in Cantorin, only the Blood still have kaf. Or it was so when I left. Perhaps supply ships have arrived from Seanchan since. Tea must do. Fix me tea.”
She very nearly knocked him out of his chair. The man was property. And a Seeker. She brewed tea. And served it to him, standing beside his chair with the pot to keep his cup full. She was surprised he did not ask her to don a veil and dance on the table.
She was permitted to sit at last, after fetching pen and ink and paper, but only to sketch maps of Tanchico and its defenses, to draw every other city and town she knew the least thing about. She listed the various forces in the field, as much as she knew of their strength and loyalties, what she had deduced of their dispositions.
When she was done, he stuffed it all in his pocket, told her to send the contents of the jute sack by the next courier boat, and left with one of those amused smiles, saying he might check on her progress again in a few weeks.
She sat there for a long time after he was gone. Every map she had drawn, every list she had made, duplicated papers sent out by courier boats long since. Having her do it all again while he watched might have been a punishment for forcing him to show his tattoos. Deathwatch Guards flaunted their ravens; Seekers rarely did. It might have been that. At least he had not gone down to the basement before she arrived. Or had he? Had he just been waiting for her to speak?
The stout iron lock hung seemingly undisturbed on the door in the hall just beyond the kitchen, but it was said Seekers knew how to open locks without keys. Taking the key from her belt pouch, she unfastened the lock and went down the narrow steps.
One lamp on a shelf lit the dirt-floored basement. Just four brick walls, cleared of everything that might help an escape. A faint smell of the slop pail hung in the air.  Her head lifted at the sound of Egeanin’s steps, dark eyes fearful and pleading. She had been the first sul’dam Egeanin had found. The first, the only. Egeanin had all but stopped looking, after she found Bethamin. And Bethamin had been in this basement since, while courier boats came and went.
“Did anyone come down here?” Egeanin said.
“No. I heard footsteps overhead, but . . . No.” Bethamin stretched out her hands. “Please, Egeanin. This is all a mistake. You have known me for ten years. Take this thing off of me.”
 It had been almost an accident, putting it on her, simply a means of securing her for a few moments. And then she had managed to knock Egeanin down, trying a dashing for freedom.
“If you bring it to me, I will,” Egeanin said angrily. She was angry with many things, not with Bethamin. “Bring the a’dam over here, and I will remove it.”
Bethamin shivered, let her hands fall. “It is a mistake,” she whispered. “A horrible mistake.” But she made no move toward the bracelet. Her first attempted flight had left her writhing on the floor upstairs, wracked by nausea, and had left Egeanin stunned.
Sul’dam controlled damane, women who could channel, by means of a’dam. It was damane who could channel, not sul’dam. But an a’dam could only control a woman who could channel. No other woman, and not a man—young men with that ability were executed, of course—only a woman who could channel. A woman who had that ability and was collared could not move more than a few steps without her bracelet on the wrist of a sul’dam to complete the link.
Egeanin felt very tired climbing the stairs and locking the door again. She wanted some tea herself, but the little the Seeker had left was cold, and she did not feel like brewing more. Instead she sat down and pulled the a’dam out of the jute bag. To her it was only finely jointed silver; she could not use it, and it could not harm her unless somebody hit her with it.
Even linking herself with an a’dam that far, denying its ability to control her, was enough to send a shiver down her spine. Women who could channel were dangerous animals rather than people. It had been they who Broke the World. They must be controlled, or they would turn everyone into their property. That was what she had been taught, what had been taught in Seanchan for a thousand years. Strange that that seemed not to have happened here. No. That was a dangerous, foolish line of thought.
Tucking the a’dam back into the bag, she cleaned the tea things to settle her mind. She liked tidiness, and there was a small satisfaction in making the kitchen so. Before she realized it she was brewing a pot of tea for herself. She did not want to think about Bethamin, and that was dangerously foolish too. Settling herself back at the table, she stirred honey into a cup of tea as black as she could make it. Not kaf, but it would do.
Despite her denials, despite her pleas, Bethamin could channel. Could other sul’dam? Was that why the High Lady Suroth wanted those left behind at Falme killed? It was unthinkable. It was impossible. The yearly testings all across Seanchan found every girl who had the spark of channeling in her: each was struck from the rolls of citizens, struck from family records, taken away to become collared damane. The same testings found the girls who could learn to wear the bracelet of the sul’dam. No woman escaped being tested each year until she was old enough that she would have begun channeling if the spark was there. How could even one girl be taken for sul’dam when she was damane? Yet there Bethamin was in the basement, held by an a’dam as by an anchor.
One thing was certain. The possibilities here were potentially deadly. This involved the Blood, and Seekers. Maybe even the Crystal Throne. Would the High Lady Suroth dare keep knowledge of this sort from the Empress? A mere ship captain could die screaming for a misplaced frown in that company, or find herself property for a whim. She had to know more if she hoped to avoid the Death of Ten Thousand Tears. To begin with, that meant spreading more money to Gelb and other ferrety skulkers like him, finding more sul’dam and seeing if a’dam held them. Beyond that . . . Beyond that she was sailing uncharted reefs with no linesman in the bow.
Touching the crossbow, still lying there with its lethal bolt, she realized that something else was certain. She was not going to let the Seekers kill her. Not just to help the High Lady Suroth keep a secret. Perhaps not for any reason. It was a thought shiveringly close to treason, but it would not go away.


|
The Boost Statechart Library
Performance
|
- Speed versus scalability
tradeoffs
- Memory management
customization
- RTTI customization
- Resource usage
Quite a bit of effort has gone into making the library fast for small
simple machines and scaleable at the same time (this applies only to
state_machine<>
, there still is some room for optimizing
fifo_scheduler<>
, especially for multi-threaded builds).
While I believe it should perform reasonably in most applications, the
scalability does not come for free. Small, carefully handcrafted state
machines will thus easily outperform equivalent Boost.Statechart machines.
To get a picture of how big the gap is, I implemented a simple benchmark in
the BitMachine example. The Handcrafted example is a handcrafted variant of
the 1-bit-BitMachine implementing the same benchmark.
I tried to create a fair but somewhat unrealistic worst-case
scenario:
- For both machines exactly one object of the only event is allocated
before starting the test. This same object is then sent to the machines
over and over
- The Handcrafted machine employs GOF-visitor double dispatch. The
states are preallocated so that event dispatch & transition amounts
to nothing more than two virtual calls and one pointer assignment
The Benchmarks - running on a 3.2GHz Intel Pentium 4 - produced the
following dispatch and transition times per event:
- Handcrafted:
- MSVC7.1: 10ns
- GCC3.4.2: 20ns
- Intel9.0: 20ns
- 1-bit-BitMachine with customized memory management:
- MSVC7.1: 150ns
- GCC3.4.2: 320ns
- Intel9.0: 170ns
Although this is a big difference I still think it will not be
noticeable in most real-world applications. No matter whether an
application uses handcrafted or Boost.Statechart machines it will...
- almost never run into a situation where a state machine is swamped
with as many events as in the benchmarks. A state machine will almost
always spend a good deal of time waiting for events (which typically come
from a human operator, from machinery or from electronic devices over
often comparatively slow I/O channels). Parsers are just about the only
application of FSMs where this is not the case. However, parser FSMs are
usually not directly specified on the state machine level but on a higher
one that is better suited for the task. Examples of such higher levels
are: Boost.Regex, Boost.Spirit, XML Schemas, etc. Moreover, the nature of
parsers allows for a number of optimizations that are not possible in a
general-purpose FSM framework.
Bottom line: While it is possible to implement a parser with this
library, it is almost never advisable to do so because other approaches
lead to better performing and more expressive code
- often run state machines in their own threads. This adds considerable
locking and thread-switching overhead. Performance tests with the
PingPong example, where two asynchronous state machines exchange events,
gave the following times to process one event and perform the resulting
in-state reaction (using the library with
boost::fast_pool_allocator<>
):
- Single-threaded (no locking and waiting): 840ns / 840ns
- Multi-threaded with one thread (the scheduler uses mutex locking
but never has to wait for events): 6500ns / 4800ns
- Multi-threaded with two threads (both schedulers use mutex
locking and exactly one always waits for an event): 14000ns /
7000ns
As mentioned above, there definitely is some room to improve the
timings for the asynchronous machines. Moreover, these are very crude
benchmarks, designed to show the overhead of locking and thread context
switching. The overhead in a real-world application will typically be
smaller and other operating systems can certainly do better in this
area. However, I strongly believe that on most platforms the threading
overhead is usually larger than the time that Boost.Statechart spends
for event dispatch and transition. Handcrafted machines will inevitably
have the same overhead, making raw single-threaded dispatch and
transition speed much less important
- almost always allocate events with
new
and destroy them
after consumption. This will add a few cycles, even if event memory
management is customized
- often use state machines that employ orthogonal states and other
advanced features. This forces the handcrafted machines to use a more
adequate and more time-consuming book-keeping
Therefore, in real-world applications event dispatch and transition not
normally constitutes a bottleneck and the relative gap between handcrafted
and Boost.Statechart machines also becomes much smaller than in the
worst-case scenario.
Detailed performance data
In an effort to identify the main performance bottleneck, the example
program "Performance" has been written. It measures the time that is spent
to process one event in different BitMachine variants. In contrast to the
BitMachine example, which uses only transitions, Performance uses a varying
number of in-state reactions together with transitions. The only difference
between in-state-reactions and transitions is that the former neither enter
nor exit any states. Apart from that, the same amount of code needs to be
run to dispatch an event and execute the resulting action.
The following diagrams show the average time the library spends to
process one event, depending on the percentage of in-state reactions
employed. 0% means that all triggered reactions are transitions. 100% means
that all triggered reactions are in-state reactions. I draw the following
conclusions from these measurements:
- The fairly linear course of the curves suggests that the measurements
with a 100% in-state reaction ratio are accurate and not merely a product
of optimizations in the compiler. Such optimizations might have been
possible due to the fact that in the 100% case it is known at
compile-time that the current state will never change
- The data points with 100% in-state reaction ratio and speed optimized
RTTI show that modern compilers seem to inline the complex-looking
dispatch code so aggressively that dispatch is reduced to little more
than it actually is, one virtual function call followed by a linear
search for a suitable reaction. For instance, in the case of the 1-bit
Bitmachine, Intel9.0 seems to produce dispatch code that is equally
efficient like the two virtual function calls in the Handcrafted
machine
- On all compilers and in all variants the time spent in event dispatch
is dwarfed by the time spent to exit the current state and enter the
target state. It is worth noting that BitMachine is a flat and
non-orthogonal state machine, representing a close-to-worst case.
Real-world machines will often exit and enter multiple states during a
transition, what further dwarfs pure dispatch time. This makes the
implementation of constant-time dispatch (as requested by a few people
during formal review) an undertaking with little merit. Instead, the
future optimization effort will concentrate on state-entry and
state-exit
- Intel9.0 seems to have problems to optimize/inline code as soon as
the amount of code grows over a certain threshold. Unlike with the other
two compilers, I needed to compile the tests for the 1, 2, 3 and 4-bit
BitMachine into separate executables to get good performance. Even then
was the performance overly bad for the 4-bit BitMachine. It was much
worse when I compiled all 4 tests into the same executable. This surely
looks like a bug in the compiler
Out of the box
The library is used as is, without any optimizations/modifications.
Native RTTI
The library is used with BOOST_STATECHART_USE_NATIVE_RTTI
defined.
Customized memory-management
The library is used with customized memory management
(boost::fast_pool_allocator
).
At the heart of every state machine lies an implementation of double
dispatch. This is due to the fact that the incoming event and the
active state define exactly which reaction the state machine will produce.
For each event dispatch, one virtual call is followed by a linear search
for the appropriate reaction, using one RTTI comparison per reaction. The
following alternatives were considered but rejected:
- Acyclic
visitor: This double-dispatch variant satisfies all scalability
requirements but performs badly due to costly inheritance tree
cross-casts. Moreover, a state must store one v-pointer for each
reaction what slows down construction and makes memory management
customization inefficient. In addition, C++ RTTI must inevitably be
turned on, with negative effects on executable size. Boost.Statechart
originally employed acyclic visitor and was about 4 times slower than it
is now (MSVC7.1 on Intel Pentium M). The dispatch speed might be better
on other platforms but the other negative effects will remain
- GOF
Visitor: The GOF Visitor pattern inevitably makes the whole machine
depend upon all events. That is, whenever a new event is added there is
no way around recompiling the whole state machine. This is contrary to
the scalability requirements
- Single two-dimensional array of function pointers: To satisfy
requirement 6, it should be possible to spread a single state machine
over several translation units. This however means that the dispatch
table must be filled at runtime and the different translation units must
somehow make themselves "known", so that their part of the state machine
can be added to the table. There simply is no way to do this
automatically and portably. The only portable way that a state
machine distributed over several translation units could employ
table-based double dispatch relies on the user. The programmer(s) would
somehow have to manually tie together the various pieces of the
state machine. Not only does this scale badly but is also quite
error-prone
Out of the box, everything (event objects, state objects, internal data,
etc.) is allocated through std::allocator< void >
(the
default for the Allocator template parameter). This should be satisfactory
for applications meeting the following prerequisites:
- There are no deterministic reaction time (hard real-time)
requirements
- The application will never run long enough for heap fragmentation to
become a problem. This is of course an issue for all long running
programs not only the ones employing this library. However, it should be
noted that fragmentation problems could show up earlier than with
traditional FSM frameworks
Should an application not meet these prerequisites, Boost.Statechart's
memory management can be customized as follows:
- By passing a model of the standard Allocator concept to the class
templates that support a corresponding parameter
(
event<>
, state_machine<>
,
asynchronous_state_machine<>
,
fifo_scheduler<>
, fifo_worker<>
).
This redirects all allocations to the passed custom allocator and should
satisfy the needs of just about any project
- Additionally, it is possible to separately customize
state memory management by overloading
operator new()
and operator delete()
for all state classes but this is
probably only useful under rare circumstances
RTTI is used for event dispatch and
state_downcast<>()
. Currently, there are exactly two
options:
- By default, a speed-optimized internal implementation is
employed
- The library can be instructed to use native C++ RTTI instead by
defining
BOOST_STATECHART_USE_NATIVE_RTTI
There are 2 reasons to favor 2:
Memory
On a 32-bit box, one empty active state typically needs less than 50
bytes of memory. Even very complex machines will usually have less
than 20 simultaneously active states so just about every machine should run
with less than one kilobyte of memory (not counting event queues).
Obviously, the per-machine memory footprint is offset by whatever
state-local members the user adds.
Processor cycles
The following ranking should give a rough picture of what feature will
consume how many cycles:
state_cast<>()
: By far the most cycle-consuming
feature. Searches linearly for a suitable state, using one
dynamic_cast
per visited state
- State entry and exit: Profiling of the fully optimized
1-bit-BitMachine suggested that roughly 3 quarters of the total event
processing time is spent destructing the exited state and constructing
the entered state. Obviously, transitions where the innermost common context is
"far" from the leaf states and/or with lots of orthogonal states can
easily cause the destruction and construction of quite a few states
leading to significant amounts of time spent for a transition
state_downcast<>()
: Searches linearly for the
requested state, using one virtual call and one RTTI comparison per
visited state
- Deep history: For all innermost states inside a state passing either
has_deep_history
or has_full_history
to its
state base class, a binary search through the (usually small) history map
must be performed on each exit. History slot allocation is performed
exactly once, at first exit
- Shallow history: For all direct inner states of a state passing
either
has_shallow_history
or has_full_history
to its state base class, a binary search through the (usually small)
history map must be performed on each exit. History slot allocation is
performed exactly once, at first exit
- Event dispatch: One virtual call followed by a linear search for a
suitable reaction, using one RTTI
comparison per visited reaction
- Orthogonal states: One additional virtual call for each exited state
if there is more than one active leaf state before a transition.
It should also be noted that the worst-case event dispatch time is
multiplied in the presence of orthogonal states. For example, if two
orthogonal leaf states are added to a given state configuration, the
worst-case time is tripled
Revised
03 December, 2006
Copyright © 2003-2006
Andreas Huber Dönni
Distributed under the Boost Software License, Version 1.0. (See
accompanying file LICENSE_1_0.txt or
copy at http://www.boost.org/LICENSE_1_0.txt)


Nsapy - 0.4b
Gregory Trubetskoy, May 16 1998
NEW: The port to Apache is here:
Httpdapy 0.1b.
NEW: A precompiled version of the Windows DLL for Python 1.5 is available
here (Netscape 3.0 server).
What is it?
Nsapy is an extension to the
Netscape http server that embeds Python
within the server using NSAPI.
Simply speaking, Nsapy allows you to write real NSAPI applications using
Python.
Who is responsible for it?
Original implementation was conceived by Aaron Watters and published in
the book "Internet
Programming with Python". I modified this code quite a bit and added
several features to it. What you will find here is quite different from
what's
in the book, though the underlying mechanism is the same.
I also added a Copyright. This was done mainly to clarify that Nsapy
is indeed free, and to make sure that the name isn't used anywhere else.
See COPYRIGHT
for details.
What's so good about it?
For one, you don't have to be an expert C programmer to create NSAPI applications.
In fact, using Nsapy may be easier than CGI,
once you figure it out. I also think it's easier and more flexible than
LiveWire
at this point.
Second advantage is speed. Your Python script will run within the server
itself, not as a separate process. In this respect, Nsapy has the same
advantage as FastCGI, ISAPI, etc.
Yet another advantage is the ability to perform initialization at server
startup. Because Nsapy programs run within the server's memory space, all
the variables persist for as long as the server is running. This was the
main reason why I decided to get into this in the first place.  This
was taking too much time, so I decided to use NSAPI. Now, I load the lookup
files at server startup time and keep them in dictionaries. Needless to
say, this was a tremendous performance boost.
There are other things that Nsapy can do. You can, for example, provide
a custom authentication mechanism using a Python script. With a wealth
of database
modules available for Python, it is very easy to store user logins
and passwords in your own custom database.
What's new in this version?
Support for extensive logging, including thread id's.
Support for critical sections. Although Python has its own thread locking
support, I found it flaky when used in Nsapy. Netscape's crit_* functions,
however are rock-sold. There is now a Python interface to crit_init(),
crit_enter() and crit_exit().
How much is it?
Nsapy is available free of charge, see the COPYRIGHT
file though.
Where can I get it?
The current version is not yet of production quality, but seems to be very
stable. Because compiling this involves having Python sources and may be
more trouble than you may want to get into right now, I have compiled binaries
for windows NT (Intel) and Solaris (SPARC). These are the only OS's
that I have Netscape servers for, feel free to port it to anything else
and please let me know if you succeed. To download the latest version click
here http://www.ispol.com/home/grisha/nsapy/nsapy-0.4b.zip
(NT) or here http://www.ispol.com/home/grisha/nsapy/nsapy-0.4b.tar.gz
(Solaris). If you want source only, look here http://www.ispol.com/home/grisha/nsapy/.
Where is the documentation?
At this point I only have a small readme.
There is also documentation in the source files nsapimod.c
and nsapy.py.
Enjoy!
Gregory ( Grisha ) Trubetskoy


hollowed out to fit their rifles"
Books are great. Even if you don't like reading, you can use a book for any of a number of handy purposes. One favorite trick is to hollow it out and hide something useful inside it.
Most often this is a gun. Often the book in question is the Good Book. It Gives A Whole New Meaning to "Guns and Bibles." Sometimes a character will go so far as to brandish the Bible while exclaiming "This will protect us!" or some similar line, only to open the Bible and reveal the weaponry within.
But the trick is flexible enough to be used for just about anything small enough to fit. Hand weapons, ammo, drugs, bottles of liquor, software, other books. Whatever.
If you're feeling clever, you can make sure that the object you are hiding goes into a hollow book of an appropriate genre or title: A secret locket in a romance novel, or a safe key hidden in a book on finance.
A book that is hollowed out and then glued into place on the shelf may be used to hide a secret switch (or the book itself may even BE the switch.) If you're lazy — or don't want to deface a book — you can just pull the book out a small way and stuff something behind it instead.
This trope can be Truth in Television; check That Other Wiki under "Book Safe" for examples.
Examples:
- In the UK, a commercial for the board game Cluedo (aka Clue in North America) showed Miss Scarlet retrieving the revolver from a hollow book in the library.
- In Mai-Otome Zwei, the "Book of Neptune," from which Nagi alleged to have learned about Yuna and the CHILDs, was really a box with the Neptune Emerald GEM inside.
- A Detective Conan case revolves around drugs hidden not in a book, but a "fake book" that has four sealed edges.
- Jin-Roh: The Wolf Brigade. The protagonist keeps a Walther PPK hidden in a book.
- In Pokémon Adventures, it's revealed that Roxanne hides Pokeballs in the book she always carries.
- In Trigun, a variation on the standard gun-in-the-Bible occurs when that big heavy cross Wolfwood has been lugging around with him everywhere turns out to not only to BE a BFG in its own right but to also CONTAIN a plethora of hand pistols as well. "It's heavy because it's so full of mercy", right...
- Cardcaptor Sakura started when Sakura opened a Book Safe: the hiding place of the the Clow Cards.
- In a flashback sequence in Yu-Gi-Oh!, Mokuba uses this to smuggle Duel Monsters cards to Seto after their stepfather stopped letting him have toys.
- The spy team in Princess Principal occasionally receives their mission files from a book in the library hollowed out to fit envelopes with wax seals. Another book, used by a different spy party, is hollowed to fit a camera, with the lens hidden in the ornate spine.
- In V for Vendetta, corrupt priest Father Liliman pulls out a gun from his Bible when V enters the room.
- Tintin. In "Explorers on the Moon" Captain Haddock smuggles his whiskey on board the rocketship inside a Doorstopper tome, labelled "Guide To Astronomy".
- Used in one Lucky Luke story - a fake priest keeps a revolver in his hollowed-out Bible. Lucky suspects him and asks him to read some words from the Good Book...
- Red Hood smuggles a collapsible bow to Arsenal inside a bible in the first issue of Red Hood and the Outlaws.
- In Jonah Hex #14 (original series), Jonah confronts a former gunslinger turned preacher who is killing bounty hunters. The preacher keeps a derringer hidden in his Bible.
- In Judge Colt #1, an outlaw attempts to escape from Colt's courtroom by grabbing a revolver hidden inside the hollowed out bible he was swearing on.
- This Bites!: The priest who was supposed to perform the Accino-Hiruno wedding is revealed to have hollowed out his Bible and used it to store a flask of vodka. Cross, who was forced to fill in for him, was not amused when he opened the book and found out.
- James Bond
- Thunderball features a sound-activated listening device in a book, which Bond uses to determine if someone has sneaked into his room while he's been out.
- One of the diamond smugglers in Diamonds Are Forever hides the goods inside a hollowed Bible.
- Live and Let Die features the classic gun in a Bible.
- Used in Johnny Dangerously: as Michael Keaton is being walked to the Chair, in passing each cell along the way each prisoner hands him one component of a Tommy gun which he assembles whilst walking. The last piece is in the Bible the priest is "reading" from. However, it's a fake gun, that falls apart mere moments after Johnny makes his escape.
- In The Matrix, Neo keeps his illegal software inside a hollow copy of the real-world philosophy text "Simulacra and Simulation" by Jean Baudrillard. A real copy of Simulacra wouldn't be thick enough to hide that much stuff (it's not a very long book), so one can conclude that the filmmakers specifically worked this reference in as a hint to the nature of Neo's reality.
The illegal software was hidden in the chapter titled "On Nihilism", again referencing the philosophical themes of the film. It's worth noting that Simulacra and Jean Baudrillard are huge influences to the Wachowskis, as plainly evident in the sequels. - In The Addams Family movie, the first stage of the secret entrance to the family vault is accessed by pulling a book out from a bookcase. The book's title? Greed. It's worth noting that ALL of the Addamses' books were like this, and that Greed was the most 'normal' book. Gone with the Wind causes a tornado when opened, and The Sun Also Rises emits daylight and the sound of birds.
- The Shawshank Redemption: The warden of Shawshank prison opens up the Bible to discover that this is where Andy has been hiding the rock hammer he used to tunnel out of his cell. Salvation, indeed. For that extra touch of irony, the hollow section begins at Exodus.
- In The Game, Michael Douglas's character keeps a revolver hidden in a copy of To Kill a Mockingbird.
- One can also conceal documents between the inside of a book cover and its lining without removing any pages at all, as in The Good Shepherd.
- There's a Western film where a large number of rifles are packed in crates labelled "Bibles".
- In Cat Ballou, Uncle Jed, disguised as a preacher, produces a knife from his Bible and uses it to cut the rope on the gallows as it is placed around Cat's neck.
- Alien: Resurrection. A Bible contains the modem Call uses to link to the ship's computer, presumably an electronic book with a 'traditional' cover.
- In The Three Musketeers (1993), Aramis (who trained to be a priest) at one point pulls a pistol out of a hollowed-out Bible and shoots one of the Cardinal's guards with it.
- In National Treasure, Ben's dad keeps money between the pages of Thomas Paine's Common Sense.
- The lead character in Frankenhooker keeps a video tape stashed away in a copy of Gray's Anatomy.
- A book of Shakespeare with a gun in it is hidden within a Library in Hard Boiled. Alan walks into the library, gets the book and kills his target. Then he replaces the gun and book on the library shelf and walks out. This was apparently done so the hitman would never be armed if he was caught, but the police find the book because of the blood on it.
- In Kickboxer V, the main character and his reluctant partner end up in prison, in which liquor is smuggled into cells by hiding the bottles into hollowed-out books, and delivering them through the library system.
- The short film The Backwater Gospel has the Sinister Minister open his Bible to take a gun out in the climax. And he's not that bad of a shot, either. It doesn't save him though.
- In Sherlock Holmes and the Secret Weapon, Holmes conceals the parts of Dr. Tobel's bomb sight inside a pair of hollowed out books.
- In BloodRayne II: Deliverance, the Preacher has a derringer hidden inside his hollowed-out Bible.
- Harold & Kumar Go to White Castle has Kumar opening a thick medical prep textbook containing a bag of marijuana and use the paper to make joints.
- In Theatre of Death, the killer keeps a knife hidden in a hollow ledger in Davras' library.
- One of Mrs. Mac's many, many booze stashes in Black Christmas (1974) is in a hollowed out book in the bookcase in the sororitory house lounge.
- In Dobermann, the Abbot carries a grenade inside a hollowed-out bible.
- El Camino: Todd kept his drug money in a hollowed-out encyclopedia collection that his grandmother gave him. When his cleaning lady checks one of them and finds the money, he murders her for knowing too much.
- The LARP of Killers mentions in the section on concealed weapons that players who hide their guns may have an advantage, but it's still considered legal self-defense to shoot the guy who's dropped into a firing stance and is pointing his geometry text at your heart.
- Although in Star Wars they don't use actual paper books very often, the Star Wars Legends have a couple of examples where a tiny hold-out blaster is hidden in a box in Imperial libraries that was supposed to contain datacards: The Complete History of Corvis Minor. Supposedly the topic was so dull that no one who didn't know would choose to pick up the box.
- When Mara Jade finds one in The Thrawn Trilogy, it's because as the former Emperor's Hand she knows exactly where to look. Providing his secret agents with quick and covert access to a weapon in an emergency was precisely why the Emperor had this particular box placed in every Imperial library across the galaxy, so when Mara has her blaster confiscated and needs a new one, she goes to the nearest library.
- In the X-Wing Series, when Corran Horn finds one for himself along with a number of other hidden library secrets, it's because he has luck and the Force (which may be the same thing)—not to mention a lot of time to look around, as he is locked in the room alone. Corran being Corran, he cracks a joke to himself that if a blaster is the complete history of Corvis Minor, it must not be a vacation spot. Naturally, he follows up that thought by searching the remaining datacard boxes, hoping in vain to find additional weaponry.
He eventually gave up on finding a "Complete History of Corvis Major" that might hold something a bit more substantial, like, say, an X-wing.
- In the later book Isard's Revenge, the squadron ends up going on a mission to Corvis Minor. Just before they make the jump, Corran recalls the holdout blaster he'd found in the datacard box.
- Discworld
- An odd variant that might be a subversion, a parody, or completely unrelated occurred in Night Watch, when a young Havelock Vetinari hid all the extant copies of a rare book on concealment inside the cover of Annals of the Great Accountants, Volume 3. He thought the author would have approved.
- In Unseen Academicals, Mrs Whitlow has cleared Ridcully's chambers of food and smoking supplies on the night before the big match. Luckily, his copy of An Occult Primer contains mints, tobacco, and cigarette papers... along with a note from Mrs. Whitlow that she didn't have the heart to confiscate those as well.
- Mike Ripley's Amateur Sleuth Angel has a copy of The History of the United States adapted into a fireproof safe.
- James Bond
- In From Russia with Love, Grant has a gun concealed in a copy of War and Peace, which fires if you press the spine in the right place.
- In Goldfinger, Bond hides his Walther PPK inside a hollowed out copy of The Bible Designed to Be Read as Literature.
- The Bronze Horseman by Paullina Simons. The protagonists hide their stache of rubles and US dollars inside a book of Pushkin's poems. Disaster is barely averted when the family is burning all their books during the winter of the Siege of Leningrad.
- In The Baby-Sitters Club, Claudia mentions that she hides some sweets in a hollowed-out book.
- In the Tim Dorsey novel Stingray Shuffle, a drug ring sells cocaine to its customers by running a book-shop and giving their drug customers hollowed-out paperbacks of a book entitled 'The Stingray Shuffle' (Chosen because it was an unpopular book that a normal customer wouldn't ask for) which had a gram of cocaine contained in the hollow. They sold so much drugs that way that they inadvertently triggered a revival of interest in the author, which caused a publicity event to be held at the shop, which caused normal people to accidentally buy paperbacks filled with drugs, which brought in the cops.
- In one early Witcher story Geralt, convalescing in the Nenneke's monastery, hides his booze behind the books in the library, because Nenneke disapproved of his drinking. Dandelion, visiting his friend there, promptly hangs lampshade on this trope.
- In Two Miles to the Border by J.T. Edson, the 'Daughters of the Lord' hide Colt Cloverleaf Pistols inside their heavy bibles.
- Black Widowers: In "The Unabridged", a valuable postage stamp is hidden inside a book. The puzzle for the Widowers is to figure out which book (or, at least, narrow down the selection).
- The Curse of the Blue Figurine: A Roman Missal is used as one, housing a blue ushabti (the titular "blue figurine") and a scroll with a note from the late Father Remigius Baart.
- In Smallville, Adam Knight hides his Lazarus serum in a hollow book.
- On House, House hides a secret stash of Vicodin inside a textbook on Lupus, on the grounds that he'll never need the textbook because "It's never Lupus." (Shockingly, in the fourth season, they did get a Lupus case.)
- Lost:
- Eko finds pieces of a Dharma film in a hollowed-out Bible in the second season.
- A different version might be when Penny puts her letter into Desmond's copy of Our Mutual Friend. Knowing that he'll turn to that book at his lowest time, it kind of works the same as a Bible.
- In the opening credits for Blackadder The Third, Edmund is browsing through a library full of big, heavy history books with titles like From Black Death to Black Adder and The Blackobite Rebellion. He then picks up a particularly hefty tome with Blackadder The Third on the front, raises an eyebrow at the camera, and opens it to reveal a lurid paperback with the episode title.
- Pushing Daisies: A nun keeps whiskey in a hollowed-out Bible and takes a Quick Nip during a prayer service when no one is looking.
- The Vicar of Dibley: The eponymous vicar hides chocolate bars inside her Bibles.
- The Wire: Randy is a group home kid who tries to stash the cash he's been earning in the spine of a school textbook. When he finds it stolen, it's one of the worst gut punches in the series.
- An episode of The Suite Life of Zack and Cody has one of the twins hiding candy bars in hollowed-out cookbooks because his mom never looks at them.
- In The Golden Girls, Blanche finds out after his passing that Big Daddy's Bible had a bottle of whiskey inside. Apparently, so did most of his other books.
- Doctor Who:
- In "Marco Polo", Marco hides the TARDIS keys in a secret compartment in his journal.
- In "City of Death", the Scarlionis' secret collection of priceless historical books and manuscripts includes a book that's hollowed out as a hiding place for some Egyptian papyri.
- Father Brown: In "The Brewer's Daughter", the woman in gaol Father Brown is trying to clear tells him to look for the Holy Grail. It turns out that the key to her father's safe is hidden inside a book titled The Holy Grail.
- Gotham:In "All Happy Families Are Alike", Bruce finds a remote control hidden inside his father's copy of Marcus Aurelius's Meditations.
- The Colbert Report: Colbert faked out the audience by revealing that he had a secret stash of Eggo waffles hidden inside of Sarah Palin's new book (the Palin story had to wait until the waffle shortage story was done).
- In his second book, America Again, Colbert says he has a hollowed-out Bible he keeps a gun in, the caption reading "The meek shall inherit my lead! Mark: .45"
- Once on Just Shoot Me!, Nina says that the only book she owns is the hollowed out almanac from her trip to Colombia.
- One episode of Square One TV's "Mathnet" segment concerned the theft of a carved crystal pigeon.  He had been storing it in a book, the pages cut into the exact shape of the statue.
- On an episode of The Incredible Hulk a hunter who enjoys hunting Hunting the Most Dangerous Game has Dr. Banner trapped in a room; a clue leads him to a key hidden inside a hollowed out book on chess, which was a major thematic element of the episode.
- Played for comic effect on The George Lopez Show:
- Benny: If you [Angie] ever tell anyone what's in this book [money] I will kill you with what's in that book.
- In an episode of Night Court, we discover in Harry's office a bookshelf that has a set of legal texts that hinge up to reveal a secret compartment, holding his pet rabbit.
- Conversational Troping in Murdoch Mysteries:
George: I love secret compartments, they're so mysterious. I've been thinking of putting a secret compartment in my book. I mean in the story, not in the actual ... Sir! A secret compartment in the actual book! It could hide a ... a smaller book!
- Stargate SG-1: Vala and Daniel find two ancient communication stones hidden in a hollowed-out "Book of Origin" (basically, the Ori version of the The Bible) when they are transported to the Ori galaxy.
- One episode in season 3 of Babylon 5 shows several religious figures paying a visit. The real reason for their visit was to relay information from Earth, contained in data crystals which one of them had kept hidden in a Bible.
- In a one-off gag in Community, Shirley opens a library book to find a gun-shaped compartment cut into it. She looks shocked, then decides she wants no part of it and puts the book back.
- In one episode of Pawn Stars, a completely hollow wooden book meant for pistol smuggling was showcased. Considering all it held at the time was an arrest record, though, apparently it didn't work...
- In 30 Rock, after Liz officiates over his divorce with Avery, Jack gifts her a remote control holder shaped like a book from Sky Mall. Note that while Jack is tremendously rich, Liz loves useless kitsch like that.
- In Miss Fisher's Murder Mysteries, the fifth episode of the first season has a variation items hidden in the spine of books. Including the poison that killed the episode's victim.
- The New Avengers: In "Forward Base", a Russian agent has the radio for contacting the eponymous forward base inside a copy of the Bible.
- Murder, She Wrote: In "The Great Twain Robbery", the Victim of the Week hides the stolen page from a manuscript within the pages of another book.
- Agents of S.H.I.E.L.D.: The episode "Paradise Lost" features the backstory of Hydra leader Gideon Malick, where he learns after his father's death he was secretly rigging their Hydra faction's Lottery of Doom to make sure he never drew out the fatal white stone, hiding one with an etch in it in his copy of Milton.
- Leverage: In "The Beantown Bail-Out Job", Parker (who is disguised as a nun) uses a mould she has hidden inside a hollowed-out Bible to make a cast of the safety deposit master key.
- CSI: In "Skin in the Game", the Theme Serial Killer leaves hollowed out bibles containing dowels at the scene of his crimes.
- In The Office (US) season 2 episode "The Fire", the staff play the "desert island" game where you're asked what three books would you bring on a desert island. Dwight thinks outside the box and says he'd bring a hollowed out Physician's Desk Reference with survival gear inside and an unaltered copy of Harry Potter and the Prisoner of Azkaban, in case he gets bored on the island.
- The Elementary episode "On the Scent" involves a drug dealer who keeps her cannabis in a copy of Leaves of Grass. Sherlock lampshades the pun.
- In the Broad City episode "The Matrix," Ilana stores weed in a hollowed-out history book.
- The video for Spaceship by Phase features a hammer (being used by oppressed office workers to dig an escape tunnel) hidden in a hollowed out book.
- In The Wizard of Id, the lawyer hides bottles of alcohol of some sort within his thick law books.
 So, when he sees an old thick photo album under a table that looks rarely used, he decides to cut out the inner pages and hide his money in it. As it happens, the kid blackmailing Flattop has drowned while ice skating on expensive skates bought with the shakedown money. Those skates led Tracy to the boarding house where he requests the boy's mother to get a photo for the newspaper and so they go to the photo album and the money is discovered. When Tracy asks where this money came from, the mother guesses it must be from her boarder and Tracy proceeds to Flattop's room while the crook is frantically trying to escape.
- Adventures in Odyssey: Whit's secret Magical Computer room is hidden behind a bookcase, and the key that unlocks it is hidden in one of the books — The Last Battle.
- On The Mother of All Treasure Tables, one of the treasures worth 50 gold pieces is a hollowed-out religious book that contains a silver hip flask filled with apple brandy.
- In Educating Rita the professor hides his whiskey behind a book.
- In Realms of the Haunting Florentine likes to hide plot-relevant keys in his journals, making it a vital aspect for the player to actually bother reading/inspecting them.
- Through the Looking-Glass actually came packaged as one of these.
- Exmortis 2 had a Bible with an ornate dagger in it, designed to destroy the "Hand of Exmortis''. The player character ignores the Bible entirely until he reads a related journal, though.
- Scratches: A bible hidden in the chapel of Blackwood Manor had a section carved out for a thick steel nail, which fits into the chapel's enormous crucifix to reveal a hidden room.
- Aurora: the only thing in your hotel room is a book with an (unloaded) gun in it.
- Shad, in The Legend of Zelda: Twilight Princess, is generally a non-action kind of guy. However, he does carry around an ornamental dagger... which he uses as a bookmark.
- Trying to get word out about Project Hurtful, Nageki hollowed out an encyclopedia and filled it with relevant documents, in the backstory to Hatoful Boyfriend.
- In Grrl Power Elsbeth's book seems like a combination of this trope and a Bag of Holding. As demonstrated when she looks up "mana potion", "antidote", and "assault rifle".
- The Simpsons:
- Homer repeatedly took out a flask hidden in a Bible whenever he claimed he needed guidance ("Now I know why they call it the good book.") He freaked out at the end of the episode when it was somehow replaced with a real Bible.
- In a Halloween episode he keeps a donut stashed in a book at work. Except when he needs it he finds he's eaten it already and left himself an IOU. He curses himself for always being one step ahead.
- The Oblongs: The old racist Church Militant woman was made Czar of Child Services. When she was first appointed she took out a Bible and said she had all she needed "right here". She then yelled "Behold, the piece of The Lord!" when she proceeded to pull the gun out (accidentally shooting it into the air.)
- Helga Pataki of Hey Arnold! often kept her diary inside a much larger book.
- This happens in King of the Hill, where Dale walks into Peggy's newly-acquired bookstore and attempts to hollow out The Odyssey on the counter in front of her to stash his handgun. Peggy naturally is appalled by this. What should have tipped her off was that Dale didn't even ask for any book in particular, he just wanted a thick one.

- Some episodes of Dexter's Laboratory used a book mechanism to allow access to the lab (which was located behind the bookcase in Dexter's room).
- Beware the Batman: In "Games", the books in the library in Humpty Dumpty's Death Course house are hollow and contain guns.
- My Little Pony: Friendship Is Magic: As part of his riddle, Discord hides The Elements of Harmony inside a book of the same name.


Garden Assistance Team Complete job for Lawn Mowing
Garden Assistance Team Accept job for Lawn Mowing
Garden Assistance Team Decline job for Lawn Mowing
Welcome!Garden Assistance
Preferred time is only a preference as service providers may be working other Seazoned jobs at that time.
29 Sleepy Hollow Drive, Hamilton Parish, Bermuda
Phone: (123) 123-456
E-Mail<EMAIL_ADDRESS>12345 Little Lonsdale St, Melbourne
Service : Snow Removal
Loading Weather...


My research is on computer vision and machine learning with a specific focus on crowd analytics, face detection,
applications of generative modeling, domain adaptation and low-level vision.
News
Jan 2019 - My internship work at Apple is accepted at ICRA 2019. More details coming soon.
DAFE-FD: Density Aware Feature Enrichment for Face Detection
(PDF) V. A. Sindagi and V. M. Patel
IEEE Winter Applications in Computer Vision (WACV), Hawaii, US, 2019.
Multi-scale Single Image Dehazing using Perceptual Pyramid Deep Network
(PDF) He ZHang, V. A. Sindagi, and V. M. Patel
IEEE Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), Salt Lake City, US, 2018.
Pushing the Limits of Unconstrained Face Detection: a Challenge Dataset and Baseline Results
(PDF) H. Nada, V. A. Sindagi, He Zhang and V. M. Patel
IEEE International Conference on Biometrics: Theory, Applications, and Systems (BTAS), Los Angeles, US, 2018.
GP-GAN: Gender Preserving GAN for Synthesizing Faces from Landmarks
(PDF) X. Di, V. A. Sindagi and V. M. Patel
IEEE International Conference on Pattern Recognition (ICPR), Beijing, China, 2018.
High-Quality Facial Photo-Sketch Synthesis Using Multi-Adversarial Networks
(PDF) L. Wang, V. A. Sindagi and V. M. Patel
IEEE International Conference on Automatic Face & Gesture Recognition (FG), Xian, China, 2018.
Generating High-Quality Crowd Density Maps using Contextual Pyramid CNNs
(PDF) V. A. Sindagi and V. M. Patel
IEEE International Conference on Computer Vision (ICCV), Venice, Italy, 2017.
CNN-based Cascaded Multi-task Learning of High-level Prior and Density Estimation for Crowd Counting
(PDF) (Code) V. A. Sindagi and V. M. Patel
IEEE International Conference on Advanced Video and Signal-based Surveillance (AVSS), Lecce, Italy, 2017.
OLED Panel Defect Detection Using Local Inlier-Outlier Ratios and Modified LBP
(PDF) V. A. Sindagi and S. Srivastava
IAPR International Conference on Machine Vision Applications (MVA), Tokyo, Japan, 2015
Journal
A Survey of Recent Advances in CNN-based Single Image Crowd Counting and Density Estimation
(PDF) V. A. Sindagi and V. M. Patel
Pattern Recognition Letters(PRL) 2018.
Domain Adaptation for Automatic OLED Panel Defect Detection Using Adaptive Support Vector Data Description
(PDF) V. A. Sindagi and S. Srivastava
International Journal of Computer Vision(IJCV), 2017
Pre-print
Joint Transmission Map Estimation and Dehazing using Deep Networks
(PDF) H. Zhang, V. A. Sindagi and V. M. Patel
Image De-raining Using a Conditional Generative Adversarial Network
(PDF) H. Zhang, V. A. Sindagi and V. M. Patel


---
layout: post
title: Poland in Color
category:
- analog
tags:
- 35mm
- analog
- antónio capelo
- antoniocapelo
- canonet
- canonet ql17
- gdynia
- poland
- ql17
- rangefinder
- sopot
- trip
- wroclaw
status: publish
type: post
published: true
meta:
_edit_last: '1'
---
Hi there,
Here you go, the color rolls from the trip to Poland.
Gdynia Port
train waiting
woman in between
Sopot
Sopot Postcard :/
Nun Reunion
Self(s)
Train waiting
beer menu
Teddy Beer
Speed GrandMa
Wondering @Malbork
Malbork Castle
Z-Man happy with the sea
Wroclaw Postcard :/
nun going back to work
Wroclaw state of mind
kick ass statue
Panoram
Deal & Observer
Next post, in a few days, will feature the Black & White rolls.
See you then,
A. Capelo


Dublin apps
ipadd applications
Home
ipad apps
Demonstrations
Leopards media
Connect us
Dublin's iphone applications
Lorum Ipsum is simple dummy
ipad image viewer
Lorum Ipsum is simply
ipad image viewer
Lorum Ipsum is simply
ipad image viewer
Lorum Ipsum is simply
Most Popular
Recent
iphone apps
Lorum Ipsum is simply
iphone apps
Lorum Ipsum is simply
iphone apps
Lorum Ipsum is simply
iphone apps
Lorum Ipsum is simply
iphone apps
Lorum Ipsum is simply
iphone apps
Lorum Ipsum is simply
iphone apps
Lorum Ipsum is simply
iphone apps
Lorum Ipsum is simply
iphone apps
Lorum Ipsum is simply


This would contain general information about the project, features, getting started, etc.
There is then a link to the documentation generated by Doxygen.


Find Out MoreRec The Trail parses ratings from Washington Trail Association trip reports and finds you hikes you should do based on prior preferences. New to hiking? We can provide you hike recommendations based on your own preferences! Or completely at random! You choose.
I've hiked in Washington before New to hiking in Washington? Check out our recommendations!Interested in learning more about any step? Click on the image!
Business UnderstandingData UnderstandingData Preparation Modeling EvaluationDeployment
Requests + BeautifulSoupMongoDB + PyMongoPandasScikit-LearnPlotlyFlask
TextBlobTuri GraphLabSentiment AnalysisTrained on Scraped Data
Ranking Factorization ModelItem Content RecommenderFinding latent patterns in the forest of ratings.