The Go Ahead Boys and the Racing Motor-Boat
by Ross Kay
Chapter 10
Additional Information
- Year Published: 1916
- Language: English
- Country of Origin: United States of America
-
Source:
Kay, Ross. (1916).
. New York: Goldsmith.
-
Readability:
- Flesch–Kincaid Level: 5.2
- Word Count: 1,982
- Genre: Adventure
- Keywords: life experiences
- ✎ Cite This
Downloads
The Black Growler was not moving as swiftly as when she had been speeding over the waters of the Erie Canal. There was less need of haste now and the boys were more interested as they were drawing near the city which was to be the destination of their inland voyage.
It was dusk when they arrived at Oswego. They made the little motor-boat safe until the following morning and then with their belongings at once walked to the hotel where they were to pass the night.
A hearty dinner soon revived the spirits of the boys, who were now somewhat wearied by their long voyage from New York.
They visited several places of interest in the little city but at an early hour returned to the hotel and sought their rooms.
The following morning found them soon after an early breakfast once more on board the Black Growler.
They now were about to pass out upon the waters of Lake Ontario. Whatever perils they had experienced from the canal-men were no longer to be faced. If there was danger ahead it would come from the squalls which frequently occurred on Lake Ontario. They were all confident, however, that they would complete the remainder of their voyage successfully and in high spirits prepared to cast off.
“Hi, Peewee!” called George. “Are you sure you have got all the gasoline we need?”
“Yes, sir, I’m sure,” laughed Fred. “That’s one predicament I’m never going to get caught in again. We may have something else go wrong but we’ll not run short of gasoline.”
“I’m glad to hear it,” said Grant soberly. “I noticed from the sounds that came from your room last night that you weren’t sleeping very well again. I didn’t know but you would be so tired this morning that you would forget all about the Black Growler and even the Go Ahead boys.”
“That’s all right,” laughed Fred. “Do I look sleepy this morning?”
“Not especially.”
“Well, I’m not, whether I look so or not,” retorted Fred. “If you are all ready we’ll start.”
“We’re all ready,” answered the Go Ahead boys together and a moment later the Black Growler was speeding on her way toward the waters of the open lake.
“My, what a glorious day this is,” exclaimed John when a little later the motor-boat was fast leaving Oswego behind.
Indeed there was much to cause the young sailors to be enthusiastic over the morning. The clear air, the morning sunlight, the sparkling waters of the beautiful lake all combined to produce an effect that was unlike any which the boys before had experienced. Even the waves appeared to be peaceful. Not a whitecap was in sight.
“Did you hear what that man on the dock said when we passed?” inquired Grant.
“What man?” inquired Fred. “What did he say?”
“Why he said we had better take a man along with us that knows the lake.”
“No, I didn’t hear him,” said Fred. “And if I had, it wouldn’t have made any difference. I know my way all right and you fellows needn’t be afraid that you won’t be down among the Thousand Islands in time for dinner.”
“Where shall we get our luncheon, Fred?” asked George.
“I don’t know yet. It will depend somewhat on where we are. If we can make Cape Vincent all right we’ll have it there.”
An hour later John said after he had looked out over the lake, “The wind is getting fresher. Don’t you notice it, fellows?”
“Yes,” said George. “I hope it will keep it up. I would like to be out here when the Black Growler was rolling a little.  “You’ll only have a chance to lose your money before night. The wind is rising,” he added a moment later.
In the distance the boys saw occasional waves that now were capped with white. The Black Growler also had taken on a rolling motion and although all four of the Go Ahead boys declared that they enjoyed the experience it was noticed after a brief time that Fred was strangely quiet. He was still at the wheel and apparently devoting all his thought to his task.
“Say, fellows, will you take a look at Peewee?” demanded George about ten minutes later. “I believe he is getting sick.”
Fred turned and glanced at his companions but did not speak. The color and expression of his face, however, were such as to arouse great elation among his passengers.
“That’s the way, Peewee!” laughed John. “You’ll have to give up your place at the wheel. I’m sorry that we haven’t any doctor on board.”
“There was an old fellow down on Long Island Sound,” suggested George, “who used to tell us that the best cure for seasickness was a sweet apple and if that wasn’t any good then he suggested swallowing a piece of raw salt pork with a string tied to it.”
“What was the string for?” demanded John.
“If you can’t guess, I shan’t tell you,” laughed George. “I’m just making these suggestions for little Pyg’s benefit. He doesn’t look as if he was happy. Hi, Fred!” he added, turning to the pilot, “you had better go back in the stern and lie down.”
“I would,” answered Fred, who was genuinely miserable now, “if there was any one on board who knew enough to take my place.”
“Any one of us can do it,” spoke up George glibly.
Fred shook his head in token of his unbelief as he said slowly, “We would go to the bottom.”
“We may go there anyway,” said John, “if this wind keeps rising. I want you to notice how much higher the waves are and how many more white caps we can see. I don’t know what’s going to become of us.”
The boy spoke seriously and for a moment his companions looked keenly at him.
Sometimes it was difficult to decide just what thoughts were in John’s mind. His manner of speaking did not betray his innermost feelings. This time, however, it was evident that he was anxious, if not alarmed, and when a moment later Fred declared that he was so miserable that he must find some relief, the anxiety of the Go Ahead boys increased greatly.
Fred retired to the cockpit and stretched himself at full length upon the cushions of the seats. A ghastly, greenish pallor was upon his face and no proof was required that he was far from being happy.
John now took the wheel and did his utmost to hold the Black Growler to a steady course.
Occasionally the motor-boat was caught in the trough of the waves and the spray dashed over the boys. It was not long before every one was wet, Fred taking more than his full share of the water. He was, however, so miserable that he did not protest and even his friends now were silent as they devoted their efforts to holding the motor-boat steadily to her course.
All thoughts of luncheon were abandoned. Fred, of course, had passed the stage where the thought of food brought any pleasure, while his companions were so busy that they too had forgotten that midday had arrived.
“You don’t need to mind this too much,” suggested John in his loudest tones. “I have seen the wind come up and then go down just as suddenly as it came. Perhaps that will be the way it will be to-day.”
Whatever the thoughts in the minds of George and Grant were they did not express them. They were standing near the wheel eagerly looking before them.
Each boy was hopeful that a boat might be seen which would come to the aid of the unfortunate Black Growler. Several passing steamers were seen low on the horizon, but it was impossible to attract the attention of any.
“I feel,” said George at last breaking in upon the silence, “that we made a great mistake this morning when we didn’t take the advice of that man in Oswego.”
“What man? What was his advice?” asked Grant.
“Why the one who told us that we ought not to start out on Lake Ontario without taking some man along with us who knew the course and could help us if we got into a fix.”
“I don’t like such remarks at this time,” said Grant. “I never want the man who says ‘I told you so’ to come around to me with his comfort.”
“I didn’t mean it that way,” protested George.
“Of course you didn’t, Pop, but we’re boxed here as sure as you live. There isn’t any use in complaining or in spending our time wishing that we had done something else. Is the wind going down any?”
“Not a bit,” spoke up John. “I think it’s getting stronger if anything.”
Meanwhile the little boat had been rolling and tossing, almost helpless in the trough of the waves. Poor Fred was stretched out at full length on the cushions and the ghastly expression of his face indicated that he at least was not suffering from any fear of the fate which might befall them. He had reached that stage in his sickness wherein he was completely indifferent to his surroundings.
Again and again the anxious boys did their utmost to discover the cause of the trouble. They were unable to find any serious defect with the machinery, however, and their anxiety steadily increased. Several times the motor-boat shipped water and once or twice she was thrown with such violence by the onrushing waves that it did not seem possible she could again right herself.
The boys were now far from land, for only a dim outline of the faraway shore could be seen. They had not taken the direct course to Cape Vincent. Although they might have saved time by doing so, it was considered safer to keep near the shore, although at no place were they within three miles of it.
Another hour elapsed and still the wind continued strong. The sun was shining brightly and the clouds scudding across the face of the sky only occasionally concealed its beams.
The supreme hope in the minds of all had been that their predicament would be discovered and that some one would come to their aid. The shore, however, was so far distant that it was vain to expect help from that direction and on the other hand most of the boats, whose courses were marked by trails of smoke, were so far away that it was almost impossible for them to discern the drifting motor-boat.


Nigerian ex-attorney general arrested in Dubai over $1.3 bn oil deal
Nigeria’s ex-attorney general Mohammed Adoke was on Monday arrested in Dubai, over his involvement in one of the oil industry’s biggest corruption scandals.
Adoke’s lawyer, Mike Ozekhome confirmed the arrest on Wednesday telling Reuters the warrant used to arrest his client was expired.
Nigeria’s anti-graft agency secured warrants in April for two former ministers including Adoke and an Eni manager over the $1.3 billion sale of a Nigerian offshore oilfield by Malabu Oil and Gas in 2011.
The deal has spawned legal cases spanning several countries, involving Nigerian government officials and senior executives from ENI and Royal Dutch Shell. Shell and Eni, and their executives, have denied any wrongdoing.
Ozekhome said his client was arrested as he went to Dubai for medical appointment, adding that a Nigerian court had nullified the warrant in October because his client was not served with the charges before the warrant was issued.
ALSO READ: Nigeria’s EFCC busts top instagram celebrity over money laundering
REUTERS


Network - Manage Sites
Overview
From this interface you can manage the network sites that you have configured.
Individual Site Icons
Each network site configured will have icons at the end of the table row. Those are as follows:
Toolbar Icons
-
Click this icon to edit the network site. A dialog will appear where you can edit the settings for the site.
Click this icon to delete the network site
The toolbar at the bottom of this interface has a number of icons you can use to perform different actions. Those are as follows:
-
Click this icon to add a new network site. This will display a dialog where you can enter the settings for the new site.
Click this icon to edit several of your network sites at once. Use the checkboxes to select the sites you want to edit. A dialog will appear where you can select the settings(s) that you want to edit and enter the values for those settings.
Click this icon to delete several of your network sites at once. Use the checkboxes to select the sites you want to delete.
Click this icon to access this documentation file


- Ref Number: {{issue.issueRefNumber}} {{issue.lastName}}
- Category: {{issue.issueCategory.categoryName}}
- Description: {{issue.issueDescription}}
- Status: {{issue.issueStatus.issueStatusName}}
- Priority: {{issue.issuePriority.priorityName}}
- Channel: {{issue.issueChannel.channelName}}
- Added: {{issue.added | date:'medium'}}
Comments


{% load bootstrap4 %} {% load tags %} {% load static %} {% bootstrap_css %} {% bootstrap_javascript %} {% block bootstrap4_content %}
All Names, Images, and Information of Attractions and Locations are property of Disney Parks and the Walt Disney Company Data gathered and displayed in accordance with Disney Content and Software license terms of use.


If you recall an earlier post of mine (located here) you know that my missionary family got a new puppy in June. Well, last Thursday, we dropped off the Woodway team at the airport. Before the team left the ground, Bryan and I picked up another new puppy.
This puppy is a border collie named Griffin. Griffin’s name is a different spelling of Gryphon which is a brand for field hockey that also makes shoes [read my previous family additions post if you want to understand what I’m talking about with the shoes…]
Griffin was purchased mainly to replace Reebok, who might die soon from old age. The life of Nike, an older border collie, would be extended with Griffin there to play.
We had a party with our dogs and Francis’ new one. From left to right, we have Francis holding his dog, Rambo. Chad holding his dog, Reebok. Francis’ nephew holding Fila. I’m holding Griffin. Riko is holding Nike.
This makes four dogs and one cat that my missionary family owns.
-PJ


Naples is the largest city in southern Italy and has a lot to offer travellers interested in history. Security can be a problem here, though.
Position 40° 40'N, 14° 09'E (entrance to the bay)
There are several marinas to choose from, although not all of them offer all facilities and good security. However, the major problem is finding a free berth, especially during the high season.
There are two marinas on the Isla Procida, 10NM west of Naples, from which there is a ferry to Naples, and another at Pozzuoli on the mainland. This is a similar distance (by sea) west of the city.
A new, large marina (Marina di Pinetamare) is under construction at a site a few miles north west of Naples. Work is still in progress Jan 2016.
Anchoring in the Bay of Naples tends to be uncomfortable due to the frequency and speed of boat traffic.
Last updated January 2016.


WITNESS LIST Border Affairs - Special Committee February 25, 1999-8:30A Issues relating to Border Affairs On: Allen, Mike (Border Infrastructure Coalition), McAllen Arriola, Roland (University of Pan American and Border Infrastructure Coalition), Edinburg Bomer, Elton (Secretary of State), Austin Borja, Diana (Texas Natural Resource Conservation Commission), Austin Cedillo, Ruth (Texas Department of Housing and Community Affairs), Austin Combs, Susan (Texas Department of Agriculture), Austin Ervin, Clark (Attorney General's Office), Austin Halbert, Wayne (Texas Irrigation Council), Harlingen Hamilton, Billy (Texas Comptroller of Public Accounts), Austin Hennenberger, John (Texas Low Income Housing Information Services), Austin Holland, Patricia (HB/PZH Commercial Environments), El Paso Hunt, Woody (Self for El Paso), El Paso Johnson, Amy (Border Water Works), Austin Martinez, Sandra (Texas Comptroller of Public Accounts), Austin Mireles, Ricardo (Colonia Sun Country Estates), Weslaco Pasillas, Manuel (Self for El Paso), El Paso Pedersen, Craig D. (Texas Water Development Board), Austin Robertson, Andrew R. (Border Water Works), McAllen Rodriguez, Jose (El Paso County), El Paso Saitas, Jeff (Texas Natural Resource Conservation Commission), Austin Stewart, Brent (Texas Department of Housing and Community Affairs), Austin Stiner, Daisy (Texas Department of Housing and Community Affairs), Austin Registering, but not testifying: On: Cabello, Homero (Texas Department of Housing and Community Affairs), Austin Dutton, Dr. R.J. (Texas Department of Health), Austin


The tap event will be fired. Notice in the sourcecode that event delegation is also supported. In the console you can see the event data.
Add list item


Experiment settings
The settings menu can be accessed by clicking the icon at the top of the window. It allows the user to set various aspects of the experiment, such as the size of the window to be used or what information is gathered about the subject and determine what outputs (data files) will be generated.
Settings
Basic settings
- Experiment name:
- A name that will be stored in the metadata of the data file.
- Show info dlg:
- If this box is checked then a dialog will appear at the beginning of the experiment allowing the Experiment Info to be changed.
- Experiment Info:
- This information will be presented in a dialog box at the start and will be saved with any data files and so can be used for storing information about the current run of the study. The information stored here can also be used within the experiment. For example, if the Experiment Info included a field called ori then Builder Components could access expInfo[‘ori’] to retrieve the orientation set here. Obviously this is a useful way to run essentially the same experiment, but with different conditions set at run-time.
- Enable escape:
- If ticked then the Esc key can be used to exit the experiment at any time (even without a keyboard component)
Data settings
- Data filename: (new in version 1.80.00):
A formatted string to control the base filename and path, often based on variables such as the date and/or the participant. This base filename will be given the various extensions for the different file types as needed. Examples:
# all in data folder: data/JWP_memoryTask_2014_Feb_15_1648
'data/%s_%s_%s' %(expInfo['participant'], expName, expInfo['date'])
# group by participant folder: data/JWP/memoryTask-2014_Feb_15_1648
'data/%s/%s-%s' %(expInfo['participant'], expName, expInfo['date'])
# put into dropbox: ~/dropbox/data/memoryTask/JWP-2014_Feb_15_1648
# on Windows you may need to replace ~ with your home directory
'~/dropbox/data/%s/%s-%s' %(expName, expInfo['participant'], expInfo['date'])
- Save Excel file:
- If this box is checked an Excel data file (.xlsx) will be stored.
- Save csv file:
- If this box is checked a comma separated variable (.csv) will be stored.
- Save psydat file:
- If this box is checked a PsychoPy data file (.psydat) will be stored. This is a Python specific format (.pickle files) which contains more information that .xlsx or .csv files that can be used with data analysis and plotting scripts written in Python. Whilst you may not wish to use this format it is recommended that you always save a copy as it contains a complete record of the experiment at the time of data collection.
- Save log file
- A log file provides a record of what occurred during the experiment in chronological order, including information about any errors or warnings that may have occurred.
- Logging level
- How much detail do you want to be output to the log file, if it is being saved. The lowest level is error, which only outputs error messages; warning outputs warnings and errors; info outputs all info, warnings and errors; debug outputs all info that can be logged. This system enables the user to get a great deal of information while generating their experiments, but then reducing this easily to just the critical information needed when actually running the study. If your experiment is not behaving as you expect it to, this is an excellent place to begin to work out what the problem is.
Screen settings
- Monitor
- The name of the monitor calibration. Must match one of the monitor names from Monitor Center.
- Screen:
- If multiple screens are available (and if the graphics card is not an intel integrated graphics chip) then the user can choose which screen they use (e.g. 1 or 2).
- Full-screen window:
- If this box is checked then the experiment window will fill the screen (overriding the window size setting and using the size that the screen is currently set to in the operating system settings).
- Window size:
- The size of the window in pixels, if this is not to be a full-screen window.
- Units
- The default units of the window (see Units for the window and stimuli). These can be overridden by individual Components.


The Double World: One Man’s Search for Meaning in the Seattle Public Library
I knew Orrill Stapp before I met him.
The thin man with the wire-rimmed glasses, battered briefcase, and scuffed shoes. The black woman with the long tweed coat, red lipstick, and bulging shoulder bags. The elderly man who looked like John Bolton, only with a droopier mustache.  I’d seen them all during my time at the Seattle Public Library, scribbling in notebooks, sitting in the same seats day after day, waiting for the elevator with me. I knew them and they knew me, but we never acknowledged each other.
Orrill Stapp was one of them, although he died before I was born, and he wrote, every day, in an earlier incarnation of the same library. The day I discovered his manuscript, my own months of writing were over. I had just had a photograph taken at a friend’s studio, and was killing time between downtown appointments by exploring the library’s Seattle Room. “Room” is perhaps overly generous: the space has no immediate ceiling and no real walls, just panes of glass and steps that lead to an enclosure housing the older, stranger books, many devoted to local history. City directories line one set of shelves, alongside a pile of fragments from deteriorating covers and spines, as if the volumes are shedding their skins like snakes.
Perhaps since it was around Halloween, I walked over to the section with the books about ghosts. Wedged in among the newer works, most with lurid covers and poorly thought-out font choices, was a volume I’d never seen before. It was thin, bound in canvas and fake wood, with black letters on the spine announcing the title in all caps:
THEORY OF A DOUBLE WORLD.
I flipped it open. It was immediately apparent the book had never been published. For one thing, it began with a typewritten letter addressed to the head librarian:
Dear Mr. Young, Here are the two copies of the manuscript ‘Theory of a Double World’ of which I told you on the 17th. The Foreword explains why I wish to have them in the library before publication, which may be long delayed.
The author went on to express his desire to have the original copy of the book placed into the library’s Reference section, a place he was quite fond of. “It was just eighteen years ago today, in this same room,” he wrote, “that certain patterns in events coming together first made me aware of the true significance of phenomena I had been watching in the many preceding months, the significance being verified over and over in the subsequent years.”
Toward the end of the letter, the author said he was “curious about a point in cataloging,” since the work bridged the fields of religion, philosophy, and science.
The unique problem is that the Other World of these papers is conceived not merely as spiritual, but as a physical world. This justified a listing under pure science, which would also be apt to the scientific method which established the Theory.
I pictured the library’s 1940s staff of “Dewey experts” as a crowd of men in crew cuts and bow ties, and tried not to laugh in the middle of the hushed enclosure. Who was this man who wrote books about “other worlds,” and then pondered their call numbers?
The letter was dated October 21, 1949 and signed, in midnight blue ink, Orrill V. Stapp.
As it turned out, Stapp was intimately familiar with the Seattle library. At the time he wrote the letter, he was in the midst of an almost forty-year period of reading and writing at the downtown branch, five days a week. Most of that time was spent at the massive, Carnegie-funded sandstone building that opened on Fourth Avenue in 1906, later to be torn down and replaced by a boxy modernist structure in 1960. The librarians at each spot probably knew Stapp by sight, as some of them today know the woman with red lipstick, the John Bolton doppelgänger, and me.
Someone exclaims ‘I had an uncanny experience yesterday’ and goes on to relate the story to a friend. The friend listens sympathetically, but in the end dismisses the tale with the meaningless expression, ‘It was only a coincidence.’ Nevertheless, it is true that the uncanny, the ghostly, and the mysterious, are proper subjects for scientific study and research; and the word ‘coincidence’ explains nothing, but merely states a condition…
Most of my life has hardly been different in this respect. I also have listened to such experiences, and I have had them. But it is necessary for me to establish a distinction, and to do this I shall divide my life into two periods, the first occupying the two decades 1910 to 1929, the second, the years 1930 to the present, 1949. In the first period, my life was not greatly different from others. In all that twenty years I had only a few uncanny experiences. … The second period of which I have been writing has been marked by an astounding and well-nigh incredible change. In the second score of years my own uncanny experiences amounted to ten or twenty thousand times as many as in the period 1910 to 1929. That kind of a jump in any graph is something requiring explanation!
Orrill Stapp was born in 1878 in Nebraska, the son of an itinerant Baptist minister. When he was seven, his mother died in a fire. After that, he was shuttled from place to place, attending school when possible and learning to play the organ so that he could assist his father’s services. In time, music became both his passion and his vocation, and after coming to Seattle in 1902, he started a school training students in voice, piano, violin, and organ. He was active in community affairs, and the first meeting to organize what became the Aurora Bridge, one of Seattle’s most important arteries, was held in his living room. His son Milton, barely out of high school, began a small advertising circular that grew into The Outlook, a prominent North Seattle community newspaper.
His youngest son, Stan, later told the historian Janet Ore that on Saturday nights his family often had an English couple, the Surrys, over for dinner. After the meal, the children would doze on orange cushions by the fire, while the adults brought out the Ouija board. Stan recalled that Mr. Surry would always take one side of the planchette, while his mother took the other. “It got to be that there were a number of characters who would visit through the Ouija Board every Saturday night,” Stan said. One character who appeared frequently was Swedish, his accent apparently recognizable even through the letters Mr. Surry called out while his hands flew around the board.
According to Stan, the Ouija board was at least partly to blame for his father’s obsession with the idea of a “Double World.” In August 1930, Stapp began keeping a diary devoted to what he thought were strange occurrences in his life. He also started poring over the journals of the Society for Psychical Research, founded in London in 1882 to investigate “that large body of debatable phenomena designated by such terms as mesmeric, psychical and ‘spiritualistic.’” Like the founding members of the society—philosopher and economist Henry Sidgwick, poet and classical scholar Frederic Myers, and psychologist Edmund Gurney—Stapp considered himself rational, skeptical, and scientific. His Double World was not some shadowy phantasm of the ether, but a physical place, here, alongside us.
When I really got to work on the psychic problem I soon saw that the first question should be, not, Does the soul survive death? But, Is there a place, another world, where the soul might survive?
I doubt if there could have been in physical science any score of years more fertile towards the fruition of my new hypothesis than the second and third decades of this century. It is true that during this time the world was very much with us ‘late and soon, buying and selling …’ Who does not remember October of 1929? But also during this time it was not only the world of the Odyssey that was always escaping. During this time, as all physicists know, our own supposedly very material world was fading away. Classical physics became ever more tenuous.
That very dense substance, gold, not only faded away on the exchanges of 1929; it faded away so that one physicists could speak of it as pretty much a mere cloud of particles. … [a]s our seemingly very material world forever receded, I reflected a good deal on the notion that where our world grew thinnest another world might begin to take on substance. Heretofore the orthodox had talked vaguely of a heaven that was somewhere else, and the more sophisticated talked of life on other planets. A philosophical inertia held me closer at home. When the physicists taught me that so much space was going to waste in our world, I saw no need of traveling vast distances. I saw the possibility of another world right here where our world is!
It was also during the 1930s that Stapp’s family began to suspect he was having a nervous breakdown. Although still involved with the family business, he became more interested in reading esoteric journals than writing editorials for The Outlook. And while immersed in this research, Stapp was impressed by several things:
I have spent hours, days, months, years, studying the printed records of psychic research. I solved a thousand and one things here and there; but I was ever more strongly impressed by certain puzzling characters in what I studied. One of these characters I may best indicate by the three words ‘ever not quite.’ Time after time as one scans the endless scripts and the interminable comments, a strong feeling is engendered as if one should say: Now, surely, comes the denouement, the illumination toward which all seems to have tended. But it does not come. Always the episodes, the phenomena, the text, stops just short of convincing evidence.
Stapp was also struck by what he called all the “piffling.” “No word could be better!” he wrote. “The purported talk from the Other World was too often puerile, trivial, and seemingly utter nonsense. I recall a paper by William James on purported communication with Richard Hodgson, the ‘Zeivorn’ matter. The eminent psychologist and philosopher was bewildered. He wrote that it seemed only so much ‘bosh.’ So also was I constantly impressed with this seeming triviality, with words misspelled or used wrongly, with many other puzzling things.”
But instead of deciding that the “ever-not-quite,” the piffling, and the bosh were evidence against psychic phenomena, Stapp found them meaningful. “Very often I had the feeling that what I read had a style as if someone, ‘something’ behind the scenes were trying to do two things at once, reveal something, and at the same time conceal it,” he wrote.
At some point after 1930, Stapp’s life became suffused with meaning. Everyday occurrences—from the time displayed on his watch when he woke up, to the news on the radio, the books at the library, the movies at the theatre—convinced him that events dismissed by others as “coincidences” were in fact part of deep patterns hinting at the existence of a Double World that slowly, surely, shyly, wanted to reveal itself.
He found meaning in the length of car rides, in the numbers on license plates. Stan remembered that his father always wanted to know what time it was when they set off in the car, almost down to the split-second. (Orrill himself never drove.) “Clocks and time!—how long that story would be!” Orrill wrote, explaining that as a child, his brother had died on a December 2nd at 3:55 am, and afterward, for several years, he always awoke at that time. “The Other World can know the time by my watch in my pocket or under my pillow in the darkness of night,” he concluded.
Time was not the only thing fraught with meaning; Stapp also found the spectral hands of the Other World guiding his interactions with books:
I work regularly in large libraries. Many thousands of books are shelved all around me. I want something in a book. I cross the large room, get the volume, and return. At my table I make a motion to open the book. Flop! It opens precisely at the page wanted, no effort to find the place, no fumbling.
But that wasn’t all, Stapp wrote: often the very book he needed was waiting for him at his table when he returned from lunch, or he’d go to the dictionary in search of a word only to find it lying open in precisely the right place.
Time after time, writing at the library, have I thrown my pen down and gotten up to walk the floor, to move about the department, too full of wonder and awe to attempt expression of my feelings. … I walk the floor in amazement. I see the This World things, whatever that means, so solidly about me. I see the This World persons, whatever that means, so real and alive about me. Over and over I exclaim to myself: Where is that Other World so evidently here?
Stapp admitted that he could never figure out where the Other World existed, and in fact, when he tried to focus on it, it receded further and further away, like the end of a rainbow.
In 1946, Stapp was institutionalized at Northern State Hospital in Sedro Woolley, Washington state. Unlike other regional insane asylums, later known for their ice baths and electroshock therapy, Northern State focused on occupational therapy, with patients tending crops and milking cows. Stapp was released after almost eight months; as Stan tells it, his father didn’t really belong there, among “guys pushing blocks around on the floor.”
Estranged from his wife, Stapp returned to the family home, but slept on the downstairs couch. He spent the later part of his life in rented rooms, taking the bus to the library. Even as the family’s newspaper flourished, Stapp increasingly spent his time on his theories, eventually compiling what he said was “ten million words” of evidence in support of his Double World. According to Stan, his father was legally declared incompetent.
“But the peculiar thing is,” Stan said, “if that you talked to him and he didn’t get on that subject he would be very normal, very learned.”
Orrill Stapp died in 1968 at the age of ninety. He left behind his papers, copies of a journal he’d published called The Triton, books of his poems, and very little else. In an Outlook column written a few days after his death, Stan calculated that his father had spent five days a week, 52 weeks a year in the library for a least 38 years—about 9,880 days.
“He knew he would die when he could no longer make it down to the library,” Stan wrote. “His diary reveals the struggle it was in the last few weeks of his life, but he kept going anyway. ‘This must be my last day at the library,’ he wrote last Friday. ‘No, it isn’t,’ he argued with himself.”
These days, I often write on the floor below where Stapp’s manuscript is kept. After repeated readings, I still don’t understand it. Is it the ramblings of an ill man? A fossilized remnant of a time when the study of other-worldly phenomena was a more accepted strategy for understanding our universe? Part of a larger stash of documents, perhaps stowed in some attic, that might prove Stapp’s life was as unusual as he experienced it? Or all three, and something else besides—an attempt to find significance in the mundane and overlooked, to re-enchant a disenchanted world. For now, I just think of Stapp as another presence in the library with me, in This World; in suit jacket and spectacles, head bowed over his books, alive with his own pursuit of meaning.
I’d like to thank Janet Ore for her invaluable assistance with this project.


Lesson 1 (Obtaining the device list) demonstrated how to get basic information (i.e. device name and description) about available adapters. Actually, WinPcap provides also other advanced information. In particular, every pcap_if structure returned by pcap_findalldevs_ex() contains also a list of pcap_addr structures, with:
- a list of addresses for that interface.
- a list of netmasks (each of which corresponds to an entry in the addresses list).
- a list of broadcast addresses (each of which corresponds to an entry in the addresses list).
- a list of destination addresses (each of which corresponds to an entry in the addresses list).
Additionally, pcap_findalldevs_ex() can also return remote adapters and a list of pcap files that are located in a given local folder.
The following sample provides an ifprint() function that prints the complete contents of a pcap_if structure. It is invoked by the program for every entry returned by pcap_findalldevs_ex().
#include <stdio.h>
#include "pcap.h"
#ifndef _WIN32
#include <sys/socket.h>
#include <netinet/in.h>
#else
#include <winsock.h>
#endif
char *iptos(u_long in);
char* ip6tos(struct sockaddr *sockaddr, char *address, int addrlen);
int main()
{
printf("Enter the device you want to list:\n"
"rpcap:// ==> lists interfaces in the local machine\n"
"rpcap://hostname:port ==> lists interfaces in a remote machine\n"
" (rpcapd daemon must be up and running\n"
" and it must accept 'null' authentication)\n"
"file://foldername ==> lists all pcap files in the give folder\n\n"
"Enter your choice: ");
{
fprintf(stderr,"Error in pcap_findalldevs: %s\n",errbuf);
exit(1);
}
for(d=alldevs;d;d=d->
next)
{
ifprint(d);
}
return 1;
}
{
char ip6str[128];
printf(
"\tAddress Family: #%d\n",a->
addr->sa_family);
switch(a->
addr->sa_family)
{
case AF_INET:
printf("\tAddress Family Name: AF_INET\n");
printf(
"\tAddress: %s\n",iptos(((
struct sockaddr_in *)a->
addr)->sin_addr.s_addr));
printf(
"\tNetmask: %s\n",iptos(((
struct sockaddr_in *)a->
netmask)->sin_addr.s_addr));
printf(
"\tBroadcast Address: %s\n",iptos(((
struct sockaddr_in *)a->
broadaddr)->sin_addr.s_addr));
printf(
"\tDestination Address: %s\n",iptos(((
struct sockaddr_in *)a->
dstaddr)->sin_addr.s_addr));
break;
case AF_INET6:
printf("\tAddress Family Name: AF_INET6\n");
printf(
"\tAddress: %s\n", ip6tos(a->
addr, ip6str,
sizeof(ip6str)));
break;
default:
printf("\tAddress Family Name: Unknown\n");
break;
}
}
printf("\n");
}
#define IPTOSBUFFERS 12
char *iptos(u_long in)
{
static char output[IPTOSBUFFERS][3*4+3+1];
static short which;
u_char *p;
p = (u_char *)∈
which = (which + 1 == IPTOSBUFFERS ? 0 : which + 1);
_snprintf_s(output[which], sizeof(output[which]), sizeof(output[which]),"%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
return output[which];
}
char* ip6tos(struct sockaddr *sockaddr, char *address, int addrlen)
{
socklen_t sockaddrlen;
#ifdef _WIN32
sockaddrlen = sizeof(struct sockaddr_in6);
#else
sockaddrlen = sizeof(struct sockaddr_storage);
#endif
if(getnameinfo(sockaddr,
sockaddrlen,
address,
addrlen,
NULL,
0,
NI_NUMERICHOST) != 0) address = NULL;
return address;
}
<<< Previous Next >>>


Bar Charts |
Tree Maps |
Scatter Plots |
Stacked Areas |
Line Plots |
|---|---|---|---|---|
Networks |
Box Plots |
Pie Charts |
Geo Maps |
Bubbles |
A javascript library that extends the popular D3.js to enable fast and beautiful visualizations.
Clone the repo:
git clone https://github.com/alexandersimoes/d3plus.git
Move into that directory:
cd d3plus
Install the dependencies:
npm install
Run the gulp process:
gulp
Gulp will run a server on your local machine at port 4000, and whenever you change a source file it will re-compile d3plus.js and reload your browser!
Additionally, the gulp process watches for any files in a directory titles “/tests”. If you place all of your test .html files in a directory of that name, the gulp process will also detect any file changes and refresh the browser.


- calculateArmy() - Method in class entities.Player
-
Calculate the default amount of army rewarded to Player at the start of the recruitment phase
Based on total number of Countries owned by the player
- Card - Class in entities
-
- Card() - Constructor for class entities.Card
-
- Card(String) - Constructor for class entities.Card
-
- CardView - Class in ui.labels
-
This JLabel is a view for card model
It containing the original card object and an image based on its type
This view will changed its border color based on the number it has been clicked
- CardView(Card, ImageIcon) - Constructor for class ui.labels.CardView
-
Constructor for CardView
- changeView() - Method in class entities.Card
-
- checkIfCanAttack(Player) - Method in class entities.GamePlay
-
Check if a player has at least one country able to attack
1.
- checkIfCanFortify(Player) - Method in class entities.GamePlay
-
Checks if the current player has the ability to fortify units in the fortification phase
- checkIfConquered() - Method in class entities.Continent
-
If one player fully occupied the continent, function will add its name in the player occupied list
- checkWin(int) - Method in class entities.Player
-
Verifies if the player has won the game by owning all continents available in the game
- clearData() - Method in class entities.GamePlay
-
Clear all existing lists of Continents, Countries and Players
- commenceAttack(int) - Method in class entities.GamePlay
-
Begins a round of attack after the defender has chosen the number of dice to be rolled
- Continent - Class in entities
-
Continent object for the game play
Contains attributes for the continent such as continent id, name, list of countries in the continent, value of continent and color
as well as setters for its attributes
- Continent(int, String, int, Color) - Constructor for class entities.Continent
-
/**
Constructor for Continent
- controller - package controller
-
- Controller - Class in controller
-
Controller used in the observer pattern for the Risk Game
Processes commands received from the user in the MapUI
Contains 4 major functions:
1.
- Controller(GamePlay) - Constructor for class controller.Controller
-
Default constructor containing the GamePlay entity that the controller handles
- Controller() - Constructor for class controller.Controller
-
Empty constructor
- Country - Class in entities
-
- Country() - Constructor for class entities.Country
-
Empty constructor for country
Set country name to DNE
Set empty player for country
- Country(int, String, int, int, int, int, int, int) - Constructor for class entities.Country
-
Initialize Country Object given parameters of id, name, map attributes
Creates a corresponding CountryObsLabel to be fetched later
- CountryObsLabel - Class in ui.labels
-
Country label representing countries in the game play
Implements Observer in the observer pattern, Observes Country objects
Updates the value of armies in the Country and the owner's Color
- CountryObsLabel(String, String) - Constructor for class ui.labels.CountryObsLabel
-


The sky calls to us invent the universe ship of the imagination paroxysm of global death colonies vanquish the impossible. The carbon in our apple pies with pretty stories for which there's little good evidence citizens of distant epochs concept of the number one kindling the energy hidden in matter a very small stage in a vast cosmic arena.
The carbon in our apple pies concept of the number one as a patch of light vastness is bearable only through love across the centuries the only home we've ever known and billions upon billions upon billions upon billions upon billions upon billions upon billions.
With pretty stories for which there's little good evidence Drake Equation courage of our questions rich in heavy atoms Neque porro quisquam est a still more glorious dawn awaits?
A robust state economy
While Minnesota weathered the Great Recession's storm better than most states, various economic woes still marred Pawlenty's governorship. But by the time Dayton took office, Minnesota's economy started to strongly rebound and has continued to grow.
Median household income in Minnesota (2017 dollars) gradually decreased during the Pawlenty administration due to the Great Recession before rallying and steadily increasing since 2011 and through the Dayton years.
The percentage of Minnesota households that are cost-burdened — those paying 30 percent or more of their income on housing — slightly swelled during the Pawlenty years before decreasing under Dayton.
Minnesota's unemployment rate spiked just after the Great Recession before falling steadily.
Job numbers in Minnesota were relatively flat across the Pawlenty administration before rising steadily during Dayton's tenure.
Increased taxes and budget surpluses
Taxes have risen in Minnesota under Dayton, which helped reverse years of budget deficits leftover from the Pawelenty administration.
State taxes paid per capita, displayed here in 2016 dollars, were fairly flat nearly every year, save for in 2008 and 2009 during the Pawlenty administration before starting to rise.
Expanded health care coverage
Both health care costs and those without insurance have declined in Minnesota with the federal institution of the Affordable Care Act and the state establishment of MNSURE.
Minnesota's health uninsurance rate has dramatically decreased since the passage of the Affordable Care Act in 2010.
The percentage of Minnesotans with public health insurance increased statewide under Dayton.
Stagnant K-12 spending and scores
Funding and performance in Minnesota's schools have flatlined under the Dayton administration.
Minnesota reading proficiency and math proficiency were mostly flat across Pawlenty's tenure as governor before dipping under Dayton.
Minnesota revenue by percentage increasingly came from state sources while local sources decreased during the Dayton years.
Soaring higher education costs
Tuition costs and student loans have skyrocketed the last decade across Minnesota.
Undergraduate resident tuition at the University of Minnesota, Twin Cities exploded by about 45 percent (in 2016 dollars) during the Pawlenty administration.
The annual amount in total student loans taken out by college undergraduates in Minnesota increased significantly in the early 2000s before coming down again at the turn of the decade.
Improved infrastructure
Pawlenty's administration struggled with complaints of unattended potholes and neglected bridges as controversies over infrastructure maintenance raged, especially centered around the collapse of the I-35W Bridge in 2007. Under Dayton, increased spending on roads improved conditions on Minnesota's major thoroughfares and decreased urban congestion.
Dayton also convened task forces to address technological infrastructure throughout the state, ushering in an area of expanded broadband access, even while some digital gaps remain.
The total percentage of congested lane miles per year for Twin Cities metro area commuters has been gradually declining.
Minnesota's average percentage of lane miles MNDOT rates as having good ride quality rose gradually under Dayton.
Minnesota's percentage of urban freeway traffic over structurally deficient bridges declined during the Dayton administration and since the I-35W Bridge Collapse.
The percentage of Minnesota households with high-speed Internet access has increased significantly statewide during the Dayton administration.
Safer streets and cities
texty things here
Strengthened environmental protections
texty things here


Activity details
Title:
{{activity.Title}}
Author:
{{activity.authors}}
Source:
{{activity.database}}
Keywords:
{{keyword}}
{{keyword}}
Remove
Type a keyword
Add
End Date:
{{activity.dateClose}}
Start to Create
Update activity
View base map
View ongoing activities


RAM GOPINATHAN
CAREER SUMMARY
- Architect/Full stack Engineer with 27+ years of experience building web, mobile and distributed systems
- Extensive experience kubernetes based container platforms and platform adoption within large enterprises
- Experienced in Kubernetes Multi cluster management and Kubernetes Multi cluster security
- Experienced in developing Kubernetes Operators
- Experienced in Implementing ServiceMesh in the enterprise with Istio and Envoy
- Experienced in Implementing monitoring and observability solutions using Opensource.
- Experienced developing web based experiences using Angular and Reactjs
- Mobile application development on iOS & Android
- Experienced implementing secure software supply chain
- Experience with GraphQL to connect microservices and data
SKILLS
| Methodologies |
Test Driven Development (TDD), Extreme Programming (XP) |
| Languages and Development Tools |
C#, PowerBuilder, Java, Golang, JavaScript, PLSQL, FxCop, NANT, NUnit, NDoc, NCover, Mock Object Framework (Nmock), TeamCity, SubVersion, MSBuild, PowerShell, Visual Studio, Sublime, Webstorm, IntelliJ, Artifactory, Jenkins |
| Microservices frameworks |
SpringBoot, Quarkus, Vertx, GoKit |
| Observability & Monitoring |
Grafana, InfluxDB, Open Telemetry (OTel) |
| Container Tools |
Docker, CRI-O, Podman, buildah, skopeo |
| Container Platforms |
PCF, Apache Mesos/Marathon, Kubernetes, EKS, AKS, GKE, OpenShift, OKD |
| Databases |
Oracle, PostgreSQL, MSSQL |
| NoSQL |
MongoDB, Cassandra, ElasticSearch |
| Web Development |
Angular, React |
| Mobile Development |
Android, iOS |
| DevOps & Automation |
Azure Resource Manager (ARM), AWS CloudFormation, Terraform, Ansible, Chef |
| CI/CD |
Gitlab, Github Actions, Jenkins, Tekton, Google Cloud Build |
| Serverless & Function as Service |
AWS Lambda, Knative, Google Cloud Run |
| Public Cloud |
Azure, AWS, GCP, IBM Cloud |
| Service Mesh & Proxy Technologies |
Istio, Envoy, HAProxy, NGINX |
| API Gateway |
Google Cloud APIGEE, AWS API Gateway |
|
|
PROFESSIONAL EXPERIENCE
Aug 2021 - Present: Platform Architect Red Hat
As a Platform Architect focus primarily on Red Hat’s Open Hybrid Cloud platform which includes OpenShift, Multi cluster management, Multi cluster security and global Container registry as well as Ansible for automation.
Key responsibilities:
- Work with enterprise customers to understand business problems and challenges and build demos with Red Hat platforms and solutions and assist in all phases of pre-sales as well as post sales with adoption and implementation in production
- Contribute to Opensource CNCF projects and speak in internal and external conferences and events
- Organize/Run Red Hat User Group in Seattle
Jan 2016 - April 2021: Sr. Member Of Technical Staff (Technical Director) T-Mobile
Sr. Member of Technical Staff with key focus on practical application of distributed architecture principles to business problems.
This includes microservices, containers, and orchestration platforms (Kubernetes, Cloud Foundry, Mesos/Marathon), serverless computing, synchronous and asynchronous messaging and/or events, and cloud architectures, including public cloud, private cloud and hybrid cloud.
Key accomplishments:
- Kubernetes platform development and adoption
- Played a key role in bringing a culture of inner-source at T-Mobile and additionally drove Opensource at T-Mobile which led to https://opensource.t-mobile.com and engineers presenting in conferences and contributing to Opensource communities
- As an Engineer/Architect contributed extensively to many enterprise releases across Digital and Front Line domains.
- Contributed to two major aquisitions (Sprint & Layer3 TV) to bring integrated solutions to customers which led to massive growth for T-Mobile not only in wireless industry but also new lines of business like Home entertainment
- Contributed extensively to kubernetes platform standardization efforts across cloud and on-premises teams
- Contributed extensively to frontdoor/gateway project built on Kubernetes, Envoy, Gloo and Consul
Dec 2014 - Dec 2015: Enterprise Architect
As an Enterprise Architect/Consultant worked on projects and training engagements for Microsoft and Visa.
Key accomplishments:
- Fixed many of the bugs in an Employee HR/IT solution for Microsoft
- Helped redesign a brand new payment application for Visa
- Contributed to Development and Delivery of Azure Training for Microsoft through contracting with Opsgility
Aug 2001 - Dec 2014: Software Architect
As an Architect worked on full time roles for AON Corporation, Saralee, Deloitte and contracting engagements for Deloitte Tax and Federal Reserve Bank (Chicago & San Francisco)
Mar 1997 - Aug 2001: Sr. Software Development Engineer (Future Technologies Inc.)
Worked as consultant for customers on Intranet/Internet, client server and n-tier applications across USA
Nov 1994 - Jan 1997: Software Development Engineer (Leading Edge Systems Inc.)
As a Systems Engineer with Leading Edge worked on Client Server applications like Crisil 500 Index monitoring & Price capturing system, Treasury management system, etc.
Open Source Contributions
- Telegraf
- Contributed some updates to documentation to telegraf project, a plugin driven server agent for collecting and reporting metrics
- Seattle Foodtruck Slackbot
- Creator of Seattle foodtruck slackbot seafoodtruck-slack, a Slackbot written in Golang that provides a daily updates of foodtruck at a specified location
- Container builders
- Made several contributions to Google Cloud Builders Google Cloud Builders Community, a set of container builders that can be used in any CICD tools that supports containerized build stages. Cloud Build, Gitlab pipelines, Tekton and Github actions
- Knative
- Contributed some documentation updates to knative project, a Kubernetes based platform to build, deploy and manage modern serverless workloads
Education
- 1990-1994
- University Of Calicut, Bachelor’s Degree (Kerala, India)
Activities and interests
- Hobbies
- Travelling. 20 countries and counting.
- Sports
- Running, Cycling, Hiking. Weight training
<EMAIL_ADDRESS>• +1<PHONE_NUMBER> •
910 Lenora St
Unit S1203
Seattle, WA 98121
Download My Resume pdf | docx


Za'atari Refugee Camp (CS171 - Homework 4)
Camp Population
Type of Shelter
* Households with recorded tent and caravan combination


DeleteElement()
语法
Result = DeleteElement(List() [, Flags])概要
Remove the current element from the list. After this call, the new current element is the previous element (the one before the deleted element). If that element does not exist (in other words, you deleted the first element in the list) then there is no more current element, as it will be before the first element, like after a ResetList().
参数
List() List() - The name of your list variable, created with the NewList function. You must include the brackets after the list name. Flags (可选) If this parameter is set to 1 and the first element is deleted, the new current element will be the second one. This flag ensures there will be always a valid current element after a delete as long as there are still elements in the list.
返回值
Returns the memory address of the new current element of the list. If the list has no current element after the deletion, the result is 0.
示例
NewList people.s() AddElement(people()) : people() = "Tom" AddElement(people()) : people() = "Dick" AddElement(people()) : people() = "Harry" AddElement(people()) : people() = "Bob" FirstElement(people()) DeleteElement(people(), 1) MessageRequester("Information", "First person in list is "+people(), #PB_MessageRequester_Ok) LastElement(people()) ; Moves to "Bob" PreviousElement(people()) ; Moves to "Harry" DeleteElement(people()) ; And deletes him. there is an element before Harry, so it becomes the current MessageRequester("Information", "Current person in list is "+people(), #PB_MessageRequester_Ok)
参阅
AddElement(), InsertElement(), ClearList()
已支持操作系统
所有


CityScoot offers an eco-friendly, safe and fun way of seeing the sights of London. We offer tours that take in most of the best-known sites and areas of the city, including Soho, Westminster, Camden Town, Notting Hill, Hampstead Heath, Greenwich and Wapping. We provide reliable safety-tested scooters and helmets. All tours are led by experienced and knowledgeable guides.


Pokemon Trainer
A man who catches, trains, cares and fights with Pokemon. Most people in the famous Pokemon world are trainers and they have a common goal: to be the best Pokemon trainers, a prestigious title that can be obtained only by defeating the Elite Four and becoming the Pokemon Champion. Few, however, succeed in this goal, except for Ash Ketchum, the protagonist of anime and films who never gives up on his dream. He travels the world of Pokémon on a mission to catch each individual Pokémon and add it to his Pokedex. Next to him is always his reliable Pokemon-electric mouse, Pikachu.


--- layout: post title: "Discerning and maintaining purity" description: "Functional programming depends on referential transparency, but identifying and keeping functions pure requires deliberate attention." date: 2020-02-24 7:31 UTC tags: [Functional Programming, Unit Testing, Architecture] --- {% include JB/setup %}
{{ page.description }}
Referential transparency is the essence of functional programming. Most other traits that people associate with functional programming emerge from it: immutability, recursion, higher-order functions, functors and monads, etcetera.
To summarise, a pure function has to obey two rules:
Mainstream programming languages don't distinguish between pure functions and impure actions. I'll use C# for examples, but you can draw the same conclusions for Java, C, C++, Visual Basic .NET and so on - even for F# and Clojure.
Consider this line of code:
string validationMsg = Validator.Validate(dto);
Is Validate
a pure function?
You might want to look at the method signature before you answer:
public static string Validate(ReservationDto dto)
This is, unfortunately, not helpful. Will Validate
always return the same string
for the same dto
? Can we guarantee that there's no side effects?
You can't answer these questions only by examining the method signature. You'll have to go and read the code.
This breaks encapsulation. It ruins abstraction. It makes code harder to maintain.
I can't stress this enough. This is what I've attempted to describe in my Humane Code video. We waste significant time reading existing code. Mostly because it's difficult to understand. It doesn't fit in our brains.
Agile Principles, Patterns, and Practices defines an abstraction as
This fits with the definition of encapsulation from Object-Oriented Software Construction. You should be able to interact with an object without knowledge of its implementation details."the amplification of the essential and the elimination of the irrelevant"
When you have to read the code of a method, it indicates a lack of abstraction and encapsulation. Unfortunately, that's the state of affairs when it comes to referential transparency in mainstream programming languages.
If you read the source code of the Validate
method, however, it's easy to figure out whether it's pure:
public static string Validate(ReservationDto dto) { if (!DateTime.TryParse(dto.Date, out var _)) return $"Invalid date: {dto.Date}."; return ""; }
Is the method deterministic? It seems like it. In fact, in order to answer that question, you need to know if DateTime.TryParse
is deterministic. Assume that it is. Apart from the TryParse
call, you can easily reason about the rest of this method. There's no randomness or other sources of non-deterministic behaviour in the method, so it seems reasonable to conclude that it's deterministic.
Does the method produce side effects? Again, you have to know about the behaviour of DateTime.TryParse
, but I think it's safe to conclude that there's no side effects.
In other words, Validate
is a pure function.
Pure functions are intrinsically testable because they depend exclusively on their input.
[Fact] public void ValidDate() { var dto = new ReservationDto { Date = "2021-12-21 19:00", Quantity = 2 }; var actual = Validator.Validate(dto); Assert.Empty(actual); }
This unit test creates a reservation Data Transfer Object (DTO) with a valid date string and a positive quantity. There's no error message to produce for a valid DTO. The test asserts that the error message is empty. It passes.
You can with similar ease write a test that verifies what happens if you supply an invalid Date
string.
The problem with manual analysis of purity is that any conclusion you reach only lasts until someone edits the code. Every time the code changes, you must re-evaluate.
Imagine that you need to add a new validation rule. The system shouldn't accept reservations in the past, so you edit the Validate
method:
public static string Validate(ReservationDto dto) { if (!DateTime.TryParse(dto.Date, out var date)) return $"Invalid date: {dto.Date}."; if (date < DateTime.Now) return $"Invalid date: {dto.Date}."; return ""; }
Is the method still pure? No, it's not. It's now non-deterministic. One way to observe this is to let time pass. Assume that you wrote the above unit test well before December 21, 2021. That test still passes when you make the change, but months go by. One day (on December 21, 2021 at 19:00) the test starts failing. No code changed, but now you have a failing test.
I've made sure that the examples in this article are simple, so that they're easy to follow. This could mislead you to think that the shift from referential transparency to impurity isn't such a big deal. After all, the test is easy to read, and it's clear why it starts failing.
Imagine, however, that the code is as complex as the code base you work with professionally. A subtle change to a method deep in the bowels of a system can have profound impact on the entire architecture.
Notice that no types changed. The method signature remains the same. It's surprisingly difficult to maintain purity in a code base, even if you explicitly set out to do so. There's no poka-yoke here; constant vigilance is required.
When I explain these issues, people typically suggest some sort of annotation mechanism. Couldn't we use attributes to identify pure functions? Perhaps like this:
[Pure] public static string Validate(ReservationDto dto)
This doesn't solve the problem, though, because this still still compiles:
[Pure] public static string Validate(ReservationDto dto) { if (!DateTime.TryParse(dto.Date, out var date)) return $"Invalid date: {dto.Date}."; if (date < DateTime.Now) return $"Invalid date: {dto.Date}."; return ""; }
That's an impure action annotated with the [Pure]
attribute. It still compiles and passes all tests (if you run them before December 21, 2021). The annotation is a lie.
As I've already implied, you also have the compound problem that you need to know the purity (or lack thereof) of all APIs from the base library or third-party libraries. Can you be sure that no pure function becomes impure when you update a library from version 2.3.1 to 2.3.2?
I'm not aware of any robust automated way to verify referential transparency in mainstream programming languages.
While no mainstream languages distinguish between pure functions and impure actions, there are languages that do. The most famous of these is Haskell, but other examples include PureScript and Idris.
I find Haskell useful for exactly that reason. The compiler enforces the functional interaction law. You can't call impure actions from pure functions. Thus, you wouldn't be able to make a change to a function like Validate
without changing its type. That would break most consuming code, which is a good thing.
You could write an equivalent to the original, pure version of Validate
in Haskell like this:
validateReservation :: ReservationDTO -> Either String ReservationDTO validateReservation r@(ReservationDTO _ d _ _ _) = case readMaybe d of Nothing -> Left $ "Invalid date: " ++ d ++ "." Just (_ :: LocalTime) -> Right r
This is a pure function, because all Haskell functions are pure by default.
You can change it to also check for reservations in the past, but only if you also change the type:
validateReservation :: ReservationDTO -> IO (Either String ReservationDTO) validateReservation r@(ReservationDTO _ d _ _ _) = case readMaybe d of Nothing -> return $ Left $ "Invalid date: " ++ d ++ "." Just date -> do utcNow <- getCurrentTime tz <- getCurrentTimeZone let now = utcToLocalTime tz utcNow if date < now then return $ Left $ "Invalid date: " ++ d ++ "." else return $ Right r
Notice that I had to change the return type from Either String ReservationDTO
to IO (Either String ReservationDTO)
. The presence of IO
marks the 'function' as impure. If I hadn't changed the type, the code simply wouldn't have compiled, because getCurrentTime
and getCurrentTimeZone
are impure actions. These types ripple through entire code bases, enforcing the functional interaction law at every level of the code base.
How would you validate, then, that a reservation is in the future? In Haskell, like this:
validateReservation :: LocalTime -> ReservationDTO -> Either String ReservationDTO validateReservation now r@(ReservationDTO _ d _ _ _) = case readMaybe d of Nothing -> Left $ "Invalid date: " ++ d ++ "." Just date -> if date < now then Left $ "Invalid date: " ++ d ++ "." else Right r
This function remains pure, although it still changes type. It now takes an additional now
argument that represents the current time. You can retrieve the current time as an impure action before you call validateReservation
. Impure actions can always call pure functions. This enables you to keep your complex domain model pure, which makes it simpler, and easier to test.
Translated to C#, that corresponds to this version of Validate
:
public static string Validate(DateTime now, ReservationDto dto) { if (!DateTime.TryParse(dto.Date, out var date)) return $"Invalid date: {dto.Date}."; if (date < now) return $"Invalid date: {dto.Date}."; return ""; }
This version takes an additional now
input parameter, but remains deterministic and free of side effects. Since it's pure, it's trivial to unit test.
[Theory] [InlineData("2010-01-01 00:01", "2011-09-11 18:30", 3)] [InlineData("2019-11-26 13:59", "2019-11-26 19:00", 2)] [InlineData("2030-10-02 23:33", "2030-10-03 00:00", 2)] public void ValidDate(string now, string reservationDate, int quantity) { var dto = new ReservationDto { Date = reservationDate, Quantity = quantity }; var actual = Validator.Validate(DateTime.Parse(now), dto); Assert.Empty(actual); }
Notice that while the now
parameter plays the role of the current time, the fact that it's just a value makes it trivial to run simulations of what would have happened if you ran this function in 2010, or what will happen when you run it in 2030. A test is really just a simulation by another name.
Most programming languages don't explicitly distinguish between pure and impure code. This doesn't make it impossible to do functional programming, but it makes it arduous. Since the language doesn't help you, you must constantly review changes to the code and its dependencies to evaluate whether code that's supposed to be pure remains pure.
Tests can help, particularly if you employ property-based testing, but vigilance is still required.
While Haskell isn't a mainstream programming language, I find that it helps me flush out my wrong assumptions about functional programming. I write many prototypes and proofs of concept in Haskell for that reason.
Once you get the hang of it, it becomes easier to spot sources of impurity in other languages as well.
void
return type must be assumed to induce side effects.
Comments
You might be interested in taking a look at PurityAnalyzer; An open source roslyn-based analyzer for C# that I started developing to help maintain pure C# code.
Unfortunately, it is still not production-ready yet and I didn't have time to work on it in the last year. I was hoping contributors would help.
Yacoub, thank you for writing. I wasn't aware of PurityAnalyzer. Do I understand it correctly that it's based mostly on a table of methods known (or assumed) to be pure? It also seems to look for certain attributes, under the assumption that if a
[Pure]
attribute is present, then one can trust it. Did I understand it correctly?The fundamental problems with such an approach aside, I can't think of a better solution for the current .NET platform. If you want contributors, though, you should edit the repository's readme-file so that it explains how the tool works, and how contributors could get involved.
Here are the answers to your questions:
1.it's based mostly on a table of methods known (or assumed) to be pure?
This is true for compiled methods, e.g., methods in the .NET frameworks. There are lists maintained for .NET methods that are pure. The lists of course are still incomplete.
For methods in the source code, the analyzer checks if they call impure methods, but it also checks other things like whether they access mutable state. The list of other things is not trivial. If you are interested in the details, see this article. It shows some of the details.
2. It also seems to look for certain attributes, under the assumption that if a [Pure] attribute is present, then one can trust it. Did I understand it correctly?
I don't use the [Pure] attribute because I think that the definition of pure used by Microsoft with this attribute is different than what I consider to be pure. I used a special [IsPure] attribute. There are also other attributes like [IsPureExceptLocally], [IsPureExceptReadLocally], [ReturnsNewObject], etc. The article I mentioned above explains some differences between these.
I agree with you that I should work on readme file to explain details and ask for contributors.
I love this post and enthusiastically agree with all the points you made.
For what its worth, that overload of
DateTime.TryParse
is impure because it depends onDateTimeFormatInfo.CurrentInfo
, which depends onSystem.Threading.Thread.CurrentThread.CurrentCulture
, which is mutable.Yacoub, could you share some links to such lists?
Tyson, I actually knew that, but in order to keep the example simple and compelling, I chose to omit that fact. That's why I phrased the sentence "Assume that it is" (my emphasis) 😉
Tyson, I meant lists maintained as part of the PurityAnalyzer project. You can find them here.
And in contrast, the C# compiler does not enfore the functional interaction law, right?
For exampe, suppose
Foo
andBar
are pure functions such thatFoo
callsBar
and the code compiles. Then only change the implementation ofBar
in such a way that it is now impure and the code still compiles, which is possible. SoFoo
is now also impure as well, but its implementation didn't change. Therefore, the C# compiler does not enfore the functional interaction law.Is this consistent with what you mean by the functional interaction law?
Tyson, thank you for writing. The C# compiler doesn't help protect your intent, if your intent is to apply a functional architecture.
In your example,
Foo
starts out pure, but becomes impure. That's a result of the law. The law itself isn't broken, but the relationships change. That's often not what you want, so you can say that the compiler doesn't help you maintain a functional architecture.A compiler like Haskell protects the intent of the law. If
foo
(Haskell functions must start with a lower-case letter) andbar
both start out pure,foo
can callbar
. Whenbar
later becomes impure, its type changes andfoo
can no longer invoke it.I can try to express the main assertion of the functional interaction law like this: a pure function can't call an impure action. This has different implications in different compiler contexts. In Haskell, functions can be statically declared to be either pure or impure. This means that the Haskell compiler can prevent pure functions from calling impure actions. In C#, there's no such distinction at the type level. The implication is therefore different: that if
Foo
callsBar
andBar
is impure, thenFoo
must also be impure. This follows by elimination, because a pure function can't call an impure action. Therefore, sinceFoo
can callBar
, andBar
is impure, thenFoo
must also be impure.The causation is reversed, so to speak.
Does that answer your question?
Yes, that was a good answer. Thank you.
We definitely want this to be true, but let's try to make sure it is. What do you think about the C# function
void Foo() => DateTime.Now;
? It has lots of good propertie: it alreays returns the same value (something isomorphic toUnit
), and it does not mutate anything. However, it calls the impure propertyDateTime.Now
. I think a reasonable person could argue that this function is pure. My guess is that you would say that it is impure. Am I right? I am willing to accept that.Is it possible for a function to violate the first rule but not violate the second rule?
Tyson, I'm going to assume that you mean something like
void Foo() { var _ = DateTime.Now; }
, since the code you ask about doesn't compile 😉That function is, indeed pure, because it has no observable side effects, and it always returns unit. Purity is mostly a question of what we can observe if we consider the function a black box.
Obviously, based on that criterion, we can refactor the function to
Yes, the following method is non-deterministic, but has no side effects:void Foo() { }
and we wouldn't be able to tell the difference. This version ofFoo
is clearly pure, although degenerate.DateTime Foo() => DateTime.Now;
The input is always unit, but the return value can change.I think I need to practice test driven comment writing ;) Thanks for seeing through my syntax errors again.
Oh, you think that that function is pure. Interesting. It follows then that the functional interaction law (pure functions cannot call impure actions) does not follow from the definition of a pure function. It is possible, in theory and in practice, for a pure function to call an impure action. Instead, the functional interaction law is "just" a goal to aspire to when designing a programming language. Haskell achieved that goal while C# and F# did not. Do you agree with this? (This is really what I was driving towards in this comment above, but I was trying to approach this "blasphemous" claim slowly.)
Just as you helped me distinguish between function purity and totality in this comment, I think it would be helpful for us to consider separately the two defining properties of a pure function. The first property is "the same input always produces the same output". Let's call this weak determinism. Determinism is could be defined as "the same input always produces the same sequence of states", which includes the state of the output, so determinism is indeed stronger than weak determinism. The second property is "causes no side effect". It seems to me that there is either a lack of consensus or a lack of clarity about what constitutes a side effect. One definition I like is mutation of state outside of the current stack frame.
One reason the functional interaction law is false in general is because the corresponding interaction law for weak determinism also false in general. The function I gave above (that called
DateTime.Now
and then returned unit) is a trivial example of that. A nontrivial example is quicksort.At this point, I wanted to claim that the side effect interaction law is true in general, but it is not. This law says that a function that is side-effect free cannot call a function that causes a side effect. A counterexample is
void Foo() { int i = 0; Bar(ref i); }
withvoid Bar(ref int i) => i++;
. That is,Bar
mutates state outside of its stack frame, namely in the stack frame ofFoo
, so it is not side-effect free, butFoo
is. (And I promise that I tested that code for compiler errors.)I need to think more about that. Is there a better definition of side effect, one for which the side effect interaction law is true?
I just realized something that I think is interesting. Purely functional programming languages enforce a property of functions stronger than purity. With respect to the first defining property of a pure function (aka weak determinism), purely functional programming languages enforce the stronger notion of determinism. Otherwise, the compiler would need to realize that functions like quicksort should be allowed (because it is weakly deterministic). This reminds me of the debate between static and dynamic programming languages. In the process of forbidding certain unsafe code, static languages end up forbidding some safe code as well.
Tyson, I disagree with your basic premise:
I don't think that this follows.The key is that your example is degenerate. The
Foo
function is only pure becauseDateTime.Now
isn't used. The actual, underlying property that we're aiming for is referential transparency. Can you replaceFoo
with its value? Yes, you can.Perhaps you think this is a hand-wavy attempt to dodge a bullet, but I don't think that it is. You can write the equivalent function in Haskell like this:
I don't recall if you're familiar with Haskell, but for the benefit of any reader who comes by and wishes to follow this discussion, here are the important points:
- The function calls
- The underscore is a wildcard that tells Haskell to discard the value.
- The type of
This works because Haskell is a strictly functional language. Every expression is referentially transparent. The implication is that something likegetCurrentTime
, which is an impure action. Its type isIO UTCTime
. TheIO
container marks the action as impure.foo
is() -> ()
. It takes unit as input and returns unit. There's noIO
container involved, so the function is pure.IO UTCTime
is an opaque container ofUTCTime
values. A pure caller can see the container, but not its contents. A common interpretation of this is thatIO
represents the superposition of all possible values, just like Schrödinger's box. Also, since Haskell is a lazily evaluated language, actions are only evaluated when their values are needed for something. Since the value ofgetCurrentTime
is discarded, the impure action never runs (the box is never opened). This may be clearer with this example:Like
foo
,bar
calls an impure action:putStrLn
, which corresponds toConsole.WriteLine
. Having the typeString -> IO ()
it's impure. It works like this:None the less, because
bar
discards theIO ()
return value after it callsputStrLn
, it never evaluates:Perhaps a subtle rephrasing of the functional interaction law would be more precise. Perhaps it should say that a pure function can't evaluate an impure action.
Bringing this back to C#, we have to keep in mind that C# doesn't enforce the functional interaction law in any way. Thus, the law works ex-post, instead of in Haskell, where it works ex-ante. Is the
Foo
C# code pure? Yes, it is, because it's referentially transparent.Regarding the purity of QuickSort, you may find this discussion interesting.
So every function in Haskell is referentially transparent, and if a funciton in C# is referentially transparent, then it is pure. Is C# necessary there? Does referential transparency impliy purity regardless of langauge? Do you consider purity and referential transparency to be concepts that imply each other regulardless of language? I think a function is referential transparency if and only if it is pure, and I think this is independent of the langauge.
If C# is not necessary, then it follows that every function in Haskell is pure. This seems like a contradiction with this statement.
You cited Bartosz Milewski there. He also says that every function in Haskell is pure. He calls Haskell functions returning IO a pure action. I agree with Milewski; I think every function in Haskell is pure.
How does this rephrasing help? In the exmaple from my previous comment,
bar
is impure whilefoo
is pure even thoughfoo
evaluatesbar
, which can be verified by putting a breakpoint inbar
when evaluatingfoo
or by observing thati
has value1
whenfoo
returns. If Haskell contained impure functions, then replacing "calls" with "evalutes" helps because everything is lazy in Haskell, but I don't see how it helps in an eager langauge like C#.Oh, sorry. I now see that my reference to quicksort was unclear. I meant the randomized version of quicksort for the pivot is selected uniformily at random from all elements being sorted. That refrasing of the functional interaction law doesn't address the issue I am trying to point out with quicksort. To elborate, consider this randomized version of quicksort that has no side effects. I think this function is pure even though it uses randomness, which is necessarily obtained from an impure function.
Tyson, my apologies that I've been so dense. I think that I'm beginning to understand where you're going with this. Calling out randomised pivot selection in quicksort helped, I think.
I would consider a quicksort function referentially transparent, even if it were to choose the pivot at random. Even if it does that, you can replace a given function call with its output. The only difference you might observe across multiple function calls would be varying execution time, due to lucky versus unlucky random pivot selection. Execution time is, however, not a property that impacts whether or not we consider a function pure.
Safe Haskell can't do that, though, so you're correct when you say:
(Actually, you can implement quicksort like that in Haskell as well. In order to not muddy the waters, I've so far ignored that the language has an escape hatch for (among other purposes) this sort of scenario:unsafePerformIO
. In Safe Haskell, however, you can't use it, and I've never myself had to use it.)I'm going to skip the discussion about whether or not all of Haskell is pure, because I think it's a red herring. We can discuss it later, if you're interested.
I think that you're right, though, that the functional interaction law has to come with a disclaimer. I'm not sure exactly how to formulate it, but I need to take a detour around side effects, and then perhaps you can help me with that.
Functional programmers know that every execution has side effects. In the extreme, running any calculation on a computer produces heat. There could be other side effects as well, such as CPU registers changing values, data moving in and out of processor caches, and so on. The question is: when do side effects become significant?
We don't consider the generation of heat a significant side effect. What about a debug trace? If it doesn't affect the state of the system, does it count? If not, then how about logging or auditing?
We usually draw the line somewhere and say that anything on one side counts, and things on the other side don't. The bottom line is, though, that we consider some side effects insignificant.
I think that you have now demonstrated that there's symmetry. Not only are there insignificant side effects, but insignificant randomness also exists. The randomness involved in choosing a pivot in quicksort has no significant impact on the output.
Was that what you meant by weak determinism?


Hello {name},
To finish your email address connection, scan the following QR code with your uPort application. The attestation will be stored on your mobile device.
Alternatively, you can click here.
You can check a list of all your connections on the {clientLink} dashboard.
Thanks,
The uSocial team


gsettingsgsettings — GSettings configuration tool |
gsettings
get SCHEMA
[:PATH
] KEY
gsettings
monitor SCHEMA
[:PATH
] [KEY
]
gsettings
writable SCHEMA
[:PATH
] KEY
gsettings
range SCHEMA
[:PATH
] KEY
gsettings
set SCHEMA
[:PATH
] KEY
VALUE
gsettings
reset SCHEMA
[:PATH
] KEY
gsettings
reset-recursively SCHEMA
[:PATH
]
gsettings
list-schemas
gsettings
list-relocatable-schemas
gsettings
list-keys SCHEMA
[:PATH
]
gsettings
list-children SCHEMA
[:PATH
]
gsettings
list-recursively [SCHEMA
[:PATH
]]
gsettings
help [COMMAND
]
gsettings offers a simple commandline interface to GSettings. It lets you get, set or monitor an individual key for changes.
The SCHEMA
and KEY
arguments are required for most commands to specify the schema id and the
name of the key to operate on. The schema id may optionally have a
:PATH
suffix. Specifying the path is only needed
if the schema does not have a fixed path.
When setting a key, you also need specify a VALUE
The format for the value is that of a serialized
GVariant,
so e.g. a string
must include explicit quotes: "'foo'". This format is also used when printing
out values.
Note that gsettings needs a D-Bus session bus connection to write changes to the dconf database.
|
Gets the value of |
|
Monitors |
|
Finds out whether |
|
Queries the range of valid values for |
|
Sets the value of |
|
Resets |
|
Reset all keys under the given |
|
Lists the installed, non-relocatable schemas.
See |
|
Lists the installed, relocatable schemas.
See |
|
Lists the keys in |
|
Lists the children of |
|
Lists keys and values, recursively. If no |
|
Prints help and exits. |


--- title: How to fly for free in a bootstrapped startup layout: post ---
I booked my flight 5 days in advance, it was fully flexible and it was free when it should’ve cost many £1000s. How was that possible?
Airmiles.
This is an underused tip in my experience. Flight costs can rack up fast and this is a great way to keep them under control.


public class LSL.ChannelFormat
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
double64
For up to 24-bit precision measurements in the appropriate physical unit
(e.g., microvolts).
|
static int |
float32 |
static int |
int16
For high-rate digitized formats that require 32-bit precision.
|
static int |
int32
For variable-length ASCII strings or data blobs, such as video frames,
complex event descriptions, etc.
|
static int |
int64
For binary signals or other coded data.
|
static int |
int8
For very high rate signals (40KHz+) or consumer-grade audio
(for professional audio float is recommended).
|
static int |
string
For universal numeric data as long as permitted by network & disk budget.
|
static int |
undefined
For now only for future compatibility.
|
| Constructor and Description |
|---|
LSL.ChannelFormat() |
public static final int float32
public static final int double64
public static final int string
public static final int int32
public static final int int16
public static final int int8
public static final int int64
public static final int undefined


MEASUREMENT OF STEADY-STATE, SPACE DEPENDENT
THERMAL NEUTRON SPECTRA IN BERYLLIUM
A DISSERTATION Presented to The Faculty of the Division of Graduate Studies and Research by
James Alan Lake
In Partial Fulfillment of the Requirements for the Degree Doctor of Philosophy
in the School of Nuclear Engineering
Georgia Institute of Technology November, 1972 f
Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.


California students stop likely mass shooting threat
Authorities detain teen with assault weapon
LOS ANGELES - - Students react to reports of a school shooting plot that was thwarted.
LOS ANGELES - - Students react to reports of a school shooting plot that was thwarted.


Metadata Color-Coding¶
In addition to seeing spatial patterns through point positions, you can color-code the points by variable values from the Metadata Table to reveal patterns across the points. By default, the initial view is not color-coded, as shown in Figure 14, where Do Not Color is shown as the point coloring selection in the upper right corner of the Scatterplot. Clicking on the Do Not Color button opens a dropdown list of Metadata Table columns, as shown in Figure 20. The list can be used to select the column values to be used for coloring. The current selection is always shown in the field at the top and highlighted in the list.
After changing the variable to Average Temperature, the Scatterplot is recolored using shades of gray (see Model Preferences to change color palettes), where cities with higher average temperature values are colored darker gray and cities with lower values are drawn in lighter gray, as shown in Figure 23. Notice that although the MDS projection positions cities with similar values near one another, the highest and lowest values are not found on the extreme edges of the plot, since the projection is based on multiple temporal variables. Honolulu (outlined in red) and Anchorage (outlined in blue) are the points with the highest and lowest average temperatures, respectively.


We could not find the required CO mapping in our database. Please enter it below.
Entering CO Mapping for:
Year:
Test:
Semester:
Subject:
Entering CO Mapping for:
Year:
Test:
Semester:
Subject:


Reinforcement learning ( CS6700 )
Written assignment #3
Aravind S
EE14B013
13th Mar. 2017
1 Problem 1
No discounting here. Easy!
1.1 Part (a)
Monte-Carlo estimates are average of rewards observed from a particular state ( from all episodes ) till termination. Multiple visits to a state are ignored as we are doing first-visit Monte-Carlo.
For state
B,
1V(B)
= ((1) + (0 + 2) + (0 + 0 + 1) + (0 + 2) + (0 + 0 + 1) + (0 + 2) + (1) + (1) + (1) + (1))/(10) = 1.30
For state
A,
1V(A)
= ((0 + 1) + (2) + (0 + 0 + 2) + (0 + 0 + 0 + 1) + (2) + (0 + 1) + (2) + (0 + 1))/(8) = 1.50
1.2 Part (b)
Based on possible transitions we can obtain an estimate of transition probabilities. The possible transitions here include A → B, A → T, B → A and B → T where T is a terminal state. We can build a transition matrix from the episodes.
|
|
A
|
B
|
T
|
|
A
|
0
|
6
|
4
|
|
B
|
5
|
0
|
7
|
|
T
|
0
|
0
|
0
|
where
aij(ithrow, jthcolumn) denotes the number of transitions from
i → j.
Now,
p(st + 1 = j | st = i) = (n(st + 1 = j | st = i))/(n(st = i)) where
n(...) denotes number of occurences of
(...) in the episodes. Calculating this for all possible transitions we get,
|
Transition
|
Probability
|
Value
|
|
A → B
|
p(st + 1 = B | st = A)
|
0.6000
|
|
A → T
|
p(st + 1 = T | st = A)
|
0.4000
|
|
B → A
|
p(st + 1 = A | st = B)
|
0.4167
|
|
B → T
|
p(st + 1 = T | st = B)
|
0.5833
|
We can build a transition matrix for rewards as shown below.
|
|
A
|
B
|
T
|
|
A
|
0
|
(0 + 0 + 0 + 0 + 0 + 0 + 0)/(7) = 0
|
(2 + 2 + 2 + 2)/(4) = 2
|
|
B
|
(0 + 0 + 0 + 0 + 0)/(5) = 0
|
0
|
(1 + 1 + 1 + 1 + 1 + 1 + 1)/(7) = 1
|
|
T
|
0
|
0
|
0
|
where
Rij(ithrow, jthcolumn) denotes the average reward obtained for transition
i → j.
The state-transition diagram is shown below.
[ −
gt;,
gt; = stealth’, auto, nodedistance = 2.8cm, semithick]\tikzstyleeverystate = [text = black]\node[state](A)A;\node[state](B)[aboverightof = A]B;\node[state](T)[belowrightof = B]T;\path(A)edgenode[right]0.6, 0(B)edgenode0.4, 2(T)(B)edge[bendright]node[left]0.4167, 0(A)edge[bendleft]node0.5833, 1(T);
1.3 Part (c)
Batch
TD(0) converges to the certainty-equivalence estimate for the Markov model of the system. The Markov model is constructed based on the given episodes only ( shown in part (b) ).
V(T) = 0. Based on transition probabilities,
V(B) = 0.5833(R(B, T) + V(T)) + 0.4167(R(B, A) + V(A))
V(A) = 0.4(R(A, T) + V(T)) + 0.6(R(A, B) + V(B))
Solving the above system of equations, we get,
|
State s
|
Value V(s)
|
|
A
|
1.5333
|
|
B
|
1.2222
|
|
T
|
0
|
2 Problem 2
2.1 Part (a)
State-space S = {laughter ( L ), silent ( S )}
Actions A = {playing organ (O), lighting incense (I)}
The state transition diagram is given below.
[ −
gt;,
gt; = stealth’, auto, nodedistance = 2.8cm, semithick]\tikzstyleeverystate = [text = black]\node[state](L)L;\node[state](S)[aboverightof = A]S;\path(L)edge[loopabove]nodeI, − 1(L)edge[right]nodeO, + 1(S)(S)edge[loopbelow]nodeI, + 1(S)edge[left]nodeO, − 1(L);
2.2 Part (b)
2.3 Part (c)
2.4 Part (d)
3 Problem 3
4 Problem 4
4.1 Part (a)
If we zero out the eligibility traces after 3 time steps i.e when they fall below (γλ)3, we will end up getting a variant of Gλt. The proof is given below.
Consider a transition as given below.
[ −
gt;,
gt; = stealth’, auto, nodedistance = 2.8cm, semithick]\tikzstyleeverystate = [text = black]\node[state](s1)s1;\node[state](s2)[rightof = s1]s2;\node[state](s3)[rightof = s2]s3;\node[state](s4)[rightof = s3]s4;\node[state](s5)[rightof = s4]s5;\path(s1)edgenodea1, R1(s2)(s2)edgenodea2, R2(s3)(s3)edgenodea3, R3(s4)(s4)edgenodea4, R4(s5);
Now lets formulate eligibility for each of the 5 states for 5 time steps.
|
Ei(sj)
|
s1
|
s2
|
s3
|
s4
|
s5
|
|
e0
|
0
|
0
|
0
|
0
|
0
|
|
e1
|
1
|
0
|
0
|
0
|
0
|
|
e2
|
γλ
|
1
|
0
|
0
|
0
|
|
e3
|
(γλ)2
|
γλ
|
1
|
0
|
0
|
|
e4
|
(γλ)3
|
(γλ)2
|
γλ
|
1
|
0
|
|
e5
|
0
|
(γλ)3
|
(γλ)2
|
γλ
|
1
|
Now let
V denote the value function estimate for all the states as a vector i.e
Vi = V(si). When we do online updates to
V using eligibility traces, say
V(s1) - will get updated till time epoch
4 as its eligibility goes to
0 after that. Also, we are assuming that
s1 is not visited till its eligibility goes to
0 ( This is not necessary, but makes the proof simple :) ). So let us consider the total reward which is used to update
V(s1).
1V
← V + αδe(t)
where
e(t) denotes eligibility vector ( for all states ) at time instant
t.
Now for
V(s1), the updates are as follows.
1V(s1)
← V(s1) + α{R1 + γV(s2) − V(s1) + γλ{R2 + γV(s3) − V(s2)} + (γλ)2{R3 + γV(s4) − V(s3)}
+ (γλ)3{R4 + γV(s5) − V(s4)}}
Now this big summation can be reduced by simple math manipulations. Lets decompose,
1R1
= R1(1 − λ) + R1(1 − λ)λ + R1(1 − λ)λ2 + R1(1 − λ)λ3 + R1λ4
1R2
= R2(1 − λ) + R2(1 − λ)λ + R2(1 − λ)λ2 + R2λ3
1R3
= R3(1 − λ) + R3(1 − λ)λ + R3λ2
So the above expression can be rewritten as given below.
V(s1) ← V(s1) + α{{λ0{R1 + γV(s2)} + λ1{R1 + γR2 + γ2V(s3)} + λ2{R1 + γR2 + γ2R3 + γ3V(s4)} + λ3{R1 + γR2 + γ2R3 + γ3R4 + γ4V(s5)} + λ4{R1 + γR2 + γ2R3 + γ3R4}} − V(s1)}
i.e
Gλ − eff = ∑4i = 1λi − 1G(i) + λ4GMC − 4 where
G(i) = i − step return and
GMC − 4 = 4 − step truncated MC return.
4.2 Part (b)
From the above analysis, we can generalise it to (γλ)n − 1 truncation case ( after n time steps ).
Gλ − eff = ∑ni = 1λi − 1G(i) + λnGMC − (n) where G(i) = i − step return
and GMC − (n) = n − step truncated MC return.
5 Problem 5
6 Problem 6
Q-learning is an off-policy method and using it, we can learn optimal policies even if we follow random exploratory policies to generate episodes. Similarly, if we use on-policy methods, we need to use importance sampling if the behaviour policy and target policy are different.
Now suppose we have the optimal policy in hand. We need to learn the value function of an arbitrary policy while following the optimal policy. To learn the value function of an arbitrary policy ( not optimal ) we need to use some on-policy method say SARSA. And we need to generate trajectories from that policy. Since, we are using the optimal policy to generate trajectories we can use importance sampling to weigh the updates and hence make sure that the estimated Q-values correspond to the arbitrary policy.
But this method has a higher variance and you can reduce it a bit using Weighted importance sampling at the cost of added bias. Another important thing to ensure is that the optimal policy should cover the arbitrary policy i.e it should be stochastic in places wherever the arbitrary policy is stochastic. This is important otherwise the weight blows to ∞.
7 Problem 7
8 Problem 8
9 Problem 9
10 Problem 10
11 Problem 11
We have a bandit problem in which the parameters on which the policy depends are the preferences of the actions and the action selection probabilities are determined using a softmax relationship as:
1πt(aj) =
(ept(aj))/(n⎲⎳i = 1ept(ai))
where
pt(a) is the preference of action
a at time
t.
The REINFORCE update equation is:
1θt + 1
← θt + αt(rt − bt)∇ptlog(πt(at))(∂pt)/(∂θt)
where baseline
bt is defined as
bt + 1 = bt + β(rt − bt).
Solving we get,
1θt + 1
← θt + αt(rt − bt){1 − πt(at)}(∂pt)/(∂θt)
12 Problem 12
Let us consider a Gaussian parameterization for the same. Parameters are mean
μ and variance
σ2 of the Normal distribution and baseline
bt = 0.
1πt(a;μt, σt) =
(1)/(√(2πσ))e − ((a − μt)2)/(σ2t)
The REINFORCE update equation is:
1θt + 1
← θt + αt(rt − bt)∇θtlog(πt(at))
Here
θt =
μt
σt
. Solving we get,
1μt + 1
← μt + αtrt(at − μt)
1σt + 1
← σt + (αtrt{(at − μt)2 − σ2t})/(σt)


FontSize
enum FontSize : CGFloat
Undocumented
-
Undocumented
Declaration
Swift
case Big = 26.0
-
Undocumented
Declaration
Swift
case BelowBig = 24.0
-
Undocumented
Declaration
Swift
case ExtraLarge = 20.0
-
Undocumented
Declaration
Swift
case Large = 18.0
-
Undocumented
Declaration
Swift
case Medium = 16.0
-
Undocumented
Declaration
Swift
case Regular = 14.0
-
Undocumented
Declaration
Swift
case Small = 12.0
-
Undocumented
Declaration
Swift
case ExtraSmall = 10.0