<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Pythonism</title>
	<atom:link href="http://pythonism.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://pythonism.wordpress.com</link>
	<description>joy in simplicity - platonic world of code and math</description>
	<lastBuildDate>Fri, 06 Jan 2012 08:01:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='pythonism.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Pythonism</title>
		<link>http://pythonism.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://pythonism.wordpress.com/osd.xml" title="Pythonism" />
	<atom:link rel='hub' href='http://pythonism.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Sentiment Ticker &#8211; The Rambling Bit</title>
		<link>http://pythonism.wordpress.com/2011/12/07/sentiment-ticker-the-rambling-bit/</link>
		<comments>http://pythonism.wordpress.com/2011/12/07/sentiment-ticker-the-rambling-bit/#comments</comments>
		<pubDate>Wed, 07 Dec 2011 17:49:43 +0000</pubDate>
		<dc:creator>Trip Technician</dc:creator>
				<category><![CDATA[Creative Writing]]></category>
		<category><![CDATA[internet programming]]></category>
		<category><![CDATA[adam_curtis]]></category>
		<category><![CDATA[edward_bernays]]></category>
		<category><![CDATA[gurdjieff]]></category>
		<category><![CDATA[john_shirley]]></category>
		<category><![CDATA[tvtropes]]></category>

		<guid isPermaLink="false">http://pythonism.wordpress.com/?p=925</guid>
		<description><![CDATA[I have recently entertained a whole series of connected thoughts inspired by the idea of the sentiment ticker. To summarise this is a device that uses keyword analysis to read the emotions of people who write content online. Because there&#8217;s so much online it may be possible to gauge the moods and feelings of whole [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pythonism.wordpress.com&amp;blog=3580594&amp;post=925&amp;subd=pythonism&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have recently entertained a whole series of connected thoughts inspired by the idea of the <a href="http://pythonism.wordpress.com/2011/12/06/new-concept-the-sentiment-ticker/">sentiment ticker</a>. To summarise this is a device that uses keyword analysis to read the emotions of people who write content online. Because there&#8217;s so much online it may be possible to gauge the moods and feelings of whole groups, nations or the world. The technique is in its infancy but leading hedge funds already use it to try to predict stock prices, so where the money goes the rest are to follow, perhaps.</p>
<p>Coincidentally at the same time I started listening to an audiobook of Isaac Asimov&#8217;s Foundation. I soon observed there was a <a href="http://en.wikipedia.org/wiki/Synchronicity" target="_blank">synchronicity</a>. Author&#8217;s note: I don&#8217;t believe such coincidences are magical or psychic in origin, as Jung thought, but they are still an interesting mental event and even literary tool.</p>
<p>The sentiment ticker and opinion mining in general would definitely qualify as embryonic Asimovian Psychohistorical tools. Governments and organisations could use them for prediction and other research. A way to formalise events in current affairs and link them with observed sentiment trends would be very powerful. If connections could be found then you may have the beginning of actual equations.</p>
<p>The other subject which is connected is the real, as opposed to SF, subject of <a href="http://www.psychohistory.com/">Psychohistory</a>. This is a discipline that uses psychotherapy techniques to try and understand the motivation of nations, groups and particularly political leaders. It is fascinating and its primary conclusion is that child rearing is critical for the future of the species. This is because psychological damage to children propagates into damaged maladapted adults who act neurotically and create conflict and perpetuation of their damage in the world. The sentiment mining approach could be a very powerful tool for a modern de Mausian psychistorian because huge volumes of textual data could be sifted for emotion words and phrases which correspond to psychohistorical patterns. Incidentally the baroque violence and depraved imagery of newspaper political cartoons are currently one of the richest veins for sentiment mining by psychohistorians, but an image processor would currently be very hard to make that could do this job.</p>
<p><span id="more-925"></span></p>
<p>The next synchronicity was that I watched the Adam Curtis documentary called <a>Century of the Self</a>&#8220;. This describes the origins and history of the discipline of Public Relations, which was invented largely by Freud&#8217;s nephew, Edward Bernays. He has a lot to answer for in my view. One of the revolutionary tools of PR is the <em>focus group</em>, where consumers describe how they feel and emote about products. Of course the sentiment ticker might turn the whole of the web into one giant focus group &#8211; a technology very prone to abuse by spin doctors, subliminal advertisers et al. Curtis makes a tentative conclusion that this psychological manipulation is bad for humanity. After watching I felt an increase in the usual sense that I was being spied on, and even manipulated, by shadowy groups in boardrooms. The democratising effect of the sentiment ticker might however empower minority and progressive groups to fight back. Anyway I think its a cool idea so I decided to let the chips fall where they may, and released it to public domain rather than trying to capitalise personally.</p>
<p>After that I listened to an audiobook of &#8220;Demons&#8221; by John Shirley. This writer shares an interest in common with me because he is a practitioner of the Gurdjieff Work, a self development methodology where the aim is to become more conscious of yourself and the world. I was in bed with gastric flu and the illness seemed to bring on a painful phase of soul searching and inner struggle. I felt the oppression and injustice of the world so keenly that I eventually had to use a Gurdjieff technique to stop the agonising thoughts. (I was also depressed after hearing that a friend of mine had had her baby taken away from her by the anti-human and utterly mentally hygienic UK Social Services).</p>
<p>My next stop was the site recommended to me by my learned nephew called <a href="http://tvtropes.org/pmwiki/pmwiki.php/Main/HomePage" target="_blank">tvtropes.org</a>. This site is just so amazing that it does indeed blow the mind, witness a very late night spent reading hard when I first found it. It analyses plot devices and common themes in tv, fantasy, science fiction, comics, films, games and any media generally. There is a strong radical current because you eventually get to the idea that media spin, religion and propaganda can all be deconstructed using the same tools the site provides. This is revolutionary intellectual crack, although it does break the spell of bad tv, and thus <a href="http://tvtropes.org/pmwiki/pmwiki.php/Main/TVTropesWillRuinYourLife" target="_blank">might ultimately ruin your sleep</a> !</p>
<p>Again the tropes also point to powerful resources available to psychohistorians. The analysis of fantasy was a tool of Freud&#8217;s. Tvtropes just gets this to rock even more: wish fulfilment and projection, denial and so many other psychological processes are cast into greater relief by the site&#8217;s analysis of our main human group fantasy &#8211; stories, <em>plain old stories.</em> The ticker could be combined with this resource also to drill deeper into the public mind.</p>
<p>Next connected in my ramblings was a rereading of some Frank Herbert, allied with a plan I have to collect his complete works. Herbert was just so visionary in multiple areas that the superlatives get boring. Wasn&#8217;t the ascension of Muad&#8217;dib in Dune so facilitated by the effective PR activities and sentiment analysis of the Bene Gesserit ? Wasn&#8217;t the observation of minutiae taught him by his mother a beautiful real time form of sentiment analysis using body language and speech rather than text. (Excuse me if you haven&#8217;t read it&#8230; again, go there !)</p>
<p>The Consensus Trance was a phrase that appeared, and it started to become of more interest to me as I googled. This phrase was coined by the radical Leary era psychologist <a href="http://en.wikipedia.org/wiki/Charles_Tart" target="_blank">Dr Charles Tart</a>. Herbert implied and described it so much. It seemed related to Gurdjieff&#8217;s sleep vividly as I lay in bed ill. Herbert too was an observer of trance and psi, and I hope that his view was that people should awake from this sleepwalking cultural state of ignorance into the more full and aware life of the individual. Bernays on the other hand seemed to me contrarily bent on merely learning how the consensus trance of the public can be manipulated for gain, usually by his influential greaseball friends. My disavowal of watching broadcast media seemed more justified to me than ever.</p>
<p>Again the ticker could shed light on this, the half formed unconscious dreams that motivate the people, their defences and how to foster and nurture awareness constructively. How to track and outwit the spin doctors and marketing men, how to wake people (including yourself) up, if possible. My nephew of 20, who turned me onto tvtropes, seemed an example too. His interests show an eclectic mixture of styles and influences which he does not make sham attempts to harmonise into a believable simple image, but instead simply lets be &#8230;in full embrace of implied paradox. And there it was &#8211; &#8220;don&#8217;t stereotype yourself&#8221;. Trying to act and be &#8220;of a piece&#8221; is directly playing into the hands of the PR manipulators. Gatherers of psychological information about the public rub their hands when their tool the &#8220;demographic&#8221; makes everyone fit neatly into a stereotyped social box. This damages society&#8217;s knowledge by oversimplifying and also directly erodes the wonderful diversity and living unpredictability of the human race. Live out of the mould and you claim your power&#8230; after all Knowledge is power and don&#8217;t we the wired have the advantage? </p>
<p>Gurdjieff wanted us to discover our real individuality, and now we can politicise this because the powers that be want us to remain asleep, like some of the people I have mentioned here managed to work out.</p>
<p>Already fanatically averse to watching broadcast TV, I now decided to avoid radio also. I weaned myself off the BBC World Service and dealt with comments by friends and family that I &#8220;wouldn&#8217;t know what was going on&#8221;. Instead I found it a pleasant way to subvert the consensus trance and deconstruct the propaganda that seemed to keep us all asleep. I showed more patience than the usual consumer of edutainment soundbites must have, and drilled into the real machinery of our oppression. Tvtropes already was showing me much, and since it also draws upon computer and role playing games like D&amp;D, I sensed how powerful the communal &#8220;Jungian active imagination&#8221; process of these games can also be to let people get good at analysing public myths. Stories bear precious psychological veins of ore, and role players seem to be learning to manipulate and reshape <em>story itself</em> for fun and challenge. How much more armed the younger generation of geeks must be becoming to protect themselves from lies and fabrication that Bernays&#8217; followers wish to propagate. If they play as many strategy games as my nephew they&#8217;d get pretty good at organising armed revolution too btw. Just as players of Sim City would know more than the jocks at the local council about urban planning, right? Modern writers who follow the path of tvtropes will be similarly wiser about cliche and derivative work, and I look forward to seeing what they come up with, in the light of the new knowledge.</p>
<p>It all tied itself into a glorious tangle and, with the poetic license of slight delirium, I began to see my sentiment ticker as a force for liberation. I might even be in a position of unique central opportunity like Paul Atreides, I thought in a flight of fancy. Eventually the fever subsided and I calmed down. But I am still excited about my ticker and hope it becomes more widely known.</p>
<p>Of course the slowcoach corporate/political lobby who sniff at my references to dubious authors and influences far too risky for their closets will discount this&#8230; but hey: that&#8217;s all part of the sentiment ticker conspiracy !</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pythonism.wordpress.com/925/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pythonism.wordpress.com/925/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pythonism.wordpress.com/925/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pythonism.wordpress.com/925/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pythonism.wordpress.com/925/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pythonism.wordpress.com/925/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pythonism.wordpress.com/925/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pythonism.wordpress.com/925/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pythonism.wordpress.com/925/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pythonism.wordpress.com/925/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pythonism.wordpress.com/925/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pythonism.wordpress.com/925/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pythonism.wordpress.com/925/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pythonism.wordpress.com/925/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pythonism.wordpress.com&amp;blog=3580594&amp;post=925&amp;subd=pythonism&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pythonism.wordpress.com/2011/12/07/sentiment-ticker-the-rambling-bit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a5395c548819c89c914016d32e44394a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pythonisms</media:title>
		</media:content>
	</item>
		<item>
		<title>Text to Speech &#8211; how to make free audiobooks</title>
		<link>http://pythonism.wordpress.com/2011/12/07/text-to-speech-how-to-make-free-audiobooks/</link>
		<comments>http://pythonism.wordpress.com/2011/12/07/text-to-speech-how-to-make-free-audiobooks/#comments</comments>
		<pubDate>Wed, 07 Dec 2011 13:16:47 +0000</pubDate>
		<dc:creator>Trip Technician</dc:creator>
				<category><![CDATA[Natural Language Processing]]></category>
		<category><![CDATA[audiobook]]></category>
		<category><![CDATA[espeak]]></category>
		<category><![CDATA[text-to-speech]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://pythonism.wordpress.com/?p=916</guid>
		<description><![CDATA[I have recently tried to break my habit of listening to the BBC World Service at bedtime. This is complex and for a number of reasons. One: it was an addiction which rendered me less flexible in life because when no radio is available you get withdrawals. Two: I am currently concerned that most broadcast [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pythonism.wordpress.com&amp;blog=3580594&amp;post=916&amp;subd=pythonism&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have recently tried to break my habit of listening to the BBC World Service at bedtime. This is complex and for a number of reasons. One: it was an addiction which rendered me less flexible in life because when no radio is available you get withdrawals. Two: I am currently concerned that most broadcast media is just propaganda. Three: the particular tone of voice and inflection that newsreaders use became annoying. Four: many of them, including newsreaders, are cokeheads and hypocrites who care as much about the problems of humanity as their idol Attila the Hun, who they are usually well to the right of on the real number line. I learned this after spending time associating with some London based journalists through a friend.</p>
<p>Wanting something to listen to I decided to use audiobooks, mostly torrented because I am a cheapskate and avowed supporter of the Pirate Party. The audio version of &#8220;Dune&#8221; was superbly done. (google to find) John Shirley&#8217;s &#8220;Demons&#8221; was good too. After a while though I became frustrated that there aren&#8217;t that many audiobooks that have actually been produced. Most of these are a bit too popularist for my taste so I began to feel audio-impoverished.</p>
<p>Then I realised that there must be ways of using text to speech for a solution. The small Linux utility I found for this purpose was &#8220;espeak&#8221;. It should come pre installed with many distros, certainly with Ubuntu.</p>
<p><span id="more-916"></span></p>
<p>The program takes a plain text file as input and renders it into a WAV with a few options needing to be specified. I used:</p>
<p><code>espeak -s 120 --split="60" -f some_book.txt -w some_book.wav</code></p>
<p>the -s 120 switch specifies the speed in words per minute. -split produces a series of output files of length 60 minutes. -f shows the input text and -w the name of the file(s) to output.</p>
<p>to convert to mp3 I used lame, doing a</p>
<p><code>sudo apt-get install lame</code></p>
<p>first and then</p>
<p><code>lame -f some_book.wav some_book.mp3</code></p>
<p>Theres also the gui based &#8220;sound converter&#8221; I noticed that this is much slower than lame.</p>
<p>the -f switch specifies lower audio quality which I decided upon based on the assumption that the speech produced by espeak was already quite low-fi and therefore I might as well save time by not wasting space on placing a low-fi voice into high resolution.</p>
<p>Now I have Stephen Hawking reading my bedtime stories <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Any book in the world that I can obtain as text may now be an instant audiobook, for using while out and about or at home. My little mp3 player has an external speaker which I use when at home, and headphones for runs, walks, shopping etc.</p>
<p>Many people might imagine that a computer voice is not that good to listen to, but now I have to say I disagree. Once you are used to it, and the occasional mispronunciation, it is perfectly acceptable. You learn to tune out noise and non-human inflection and eventually it is no worse than a human reader. After all when we read off paper the words are what we focus on not the typeface etc. My computer voice is just a neutral way of getting words as text into words as audio. I am loving it.</p>
<p>I have the ocean of text available to me to listen in a more leisurely and relaxed way than poring over screens or paper. I&#8217;ve already copy-pasted stuff like blog posts and wikipedia, too. I tend to amass about a few hundred KB of text which I put into one text file. as a guideline using my methods a 500KB text file will result in about 12 hours of mp3 audio.</p>
<p>It occurred to me that this should be built into ipods. I know that Kindle has a blind-reader, which has been said to be fairly bad. I&#8217;d love an ipod which I could upload a text file to and it would read to me. Should be a definite feature in my view in the future. Espeak for Linux is not a very advanced text to speech anyway. I have heard that the apple one is better, and various windows ones too. I suppose that to be good a reader needs to have a lot of pronunciation rules developed by linguists and perhaps even some semantic parsing to allow for as stab at natural inflection based on meaning, as well as based on pronunciation rules. It would be a good challenge for code. The way different phonemes elide together needs to be coded and perhaps with some training on large audio data it could be done a lot better than espeak. Linux needs a really good app to do this so it can compete with win and mac, in my view.  A note was made in an ubuntu suggested features forum to this extent. Let&#8217;s go for it people.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pythonism.wordpress.com/916/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pythonism.wordpress.com/916/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pythonism.wordpress.com/916/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pythonism.wordpress.com/916/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pythonism.wordpress.com/916/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pythonism.wordpress.com/916/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pythonism.wordpress.com/916/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pythonism.wordpress.com/916/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pythonism.wordpress.com/916/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pythonism.wordpress.com/916/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pythonism.wordpress.com/916/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pythonism.wordpress.com/916/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pythonism.wordpress.com/916/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pythonism.wordpress.com/916/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pythonism.wordpress.com&amp;blog=3580594&amp;post=916&amp;subd=pythonism&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pythonism.wordpress.com/2011/12/07/text-to-speech-how-to-make-free-audiobooks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a5395c548819c89c914016d32e44394a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pythonisms</media:title>
		</media:content>
	</item>
		<item>
		<title>New Concept &#8211; The Sentiment Ticker</title>
		<link>http://pythonism.wordpress.com/2011/12/06/new-concept-the-sentiment-ticker/</link>
		<comments>http://pythonism.wordpress.com/2011/12/06/new-concept-the-sentiment-ticker/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 13:53:08 +0000</pubDate>
		<dc:creator>Trip Technician</dc:creator>
				<category><![CDATA[internet programming]]></category>
		<category><![CDATA[Natural Language Processing]]></category>
		<category><![CDATA[Text analysis]]></category>

		<guid isPermaLink="false">http://pythonism.wordpress.com/?p=914</guid>
		<description><![CDATA[The Concept The sentiment ticker is a small widget that sits on your computer&#8217;s desktop much like the conventional stock ticker. This widget connects to a central server cluster run by the provider. It provides a graphical/numerical display of various indices of market, political and consumer mood and feeling. The central servers poll blogs, tweets, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pythonism.wordpress.com&amp;blog=3580594&amp;post=914&amp;subd=pythonism&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>The  Concept</strong></p>
<p>The sentiment ticker is a small widget that sits on your computer&#8217;s desktop much like the conventional stock ticker. This widget connects to a central server cluster run by the provider. It provides a graphical/numerical display of various indices of market, political and consumer mood and feeling. The central servers poll blogs, tweets, journalistic articles and press releases constantly and perform sentiment analysis on this online content. Sentiment mining is looking for clusters of mood and emotion words in certain contexts. this has been shown to be useful, most notably recently when the Arab Spring was &#8220;predicted&#8221; (in hindsight) by analysing the sentiments of millions of bloggers, tweeters etc. a statistically significant spike was found in middle east mood just before the spring started.</p>
<p>Background</p>
<p>A stock ticker is a small program that stays open on your  screen with real-time updated information on stock prices, and states of the various markets. It usually shows a graph or two and required price information you have set it for. All traders use them perennially.</p>
<p><span id="more-914"></span></p>
<p>Data mining is any process whereby useful information is gleaned by a program from large collections of data, in this case the textual content of the web. Sentiment mining is a particular kind of data mining where psychological and linguistic techniques are used to guess about human emotion from text on the web. This can be done to find things like &#8220;consumer confidence&#8221;, &#8220;willingness to spend&#8221;, &#8220;confidence in a certain stock&#8221;, &#8220;positivity about the future&#8221;.</p>
<p>So the ticker is the program that displays useful and concise information, and the mining is the means whereby this information is obtained. One part of the system mines perpetually and sends the data gained to each ticker belonging to every user whereby it is displayed for the user to take advantage of.</p>
<p>Leading Hedge Funds are using sentiment mining already. The ticker would be the democratisation of this process because it would allow sentiment mined knowledge to be available for a price to any investor who wanted, not just the pioneers and the elite rich enough to pay for a bespoke service.</p>
<p><strong>Elaboration</strong></p>
<p>We know that constant updates on actual market price levels is now seen as essential for financial decision makers. The sentiment ticker will enhance anyone in the industries knowledge of what is happening in the world, in a given country, or in a given industry. Gauging the psychological element in financial processes has always been something leading analysts do, but with the sentiment ticker a valuable extra insight into processes will be available. The data will be available to slice in a number of ways, by region, country, chosen time period or even down to an individual company. Knowing the world&#8217;s mood will become an essential metric for so many areas. Macroeconomics will also benefit from the ticker, enabling investors and their associates to be that much more educated about what is buzzing in the &#8220;planetary mind&#8221;.</p>
<p>The central sentiment server will be based on a set of Natural Language Processing algorithms, most of which are quite simple because they involve measuring the frequencies of emotion-indicator keywords. The implementers will expand and refine the system as the markets build the new service into their operations. A survey of human emotional modes will lead to isolating keywords and key phrases at first. Much of this work has already been started, but the process will no doubt give rise to new insights which will be added as the knowledge base of the ticker service provider develops.</p>
<p>The programming work can be done using mainly open source tools such as Python and the NLTK, which form the leading platform for NLP work. It is recommended that the service be Windows based until the means to hire Linux and Mac developers emerges. The costs of renting servers to form the platform will be low and services like Amazon&#8217;s EC2 are cheap and flexible enough to work well with the problem. A spider will constantly collect text from the web and the language processing will run concurrently so that the ticker can update on short intervals. Individual blocks of text will be ranked for importance using a spread of factors such as company position of the author, influence of them and their employer, location etc. The sentiment indices will be calculated using a weighting system that takes advantage of the rank given to the text.</p>
<p>The widget will be a small, attractively designed desktop window that stays active in the background when other work is being done. There may at first be a number of packages offered on a subscription basis perhaps starting with a bare-bones free service and building up to a platinum service with full functionality.</p>
<p><strong>Spoofing</strong> </p>
<p>It is anticipated that many people will find it in their interests to try and manipulate the output of sentiment tickers by spoofing. This can be as simple as getting Facebook friends to say they believe a given stock will rise, or as complex as hiring armies of content authors to blog for you. This may even birth a whole industry in the same way as web content farms try to spoof Google&#8217;s keyword mechanisms to earn pay-per-click money. This will likely necessitate an arms race between sentiment developers and spammers, the exact unfolding of which will need to be observed and adapted to. This possibility does not invalidate the usefulness of the device, though, in the same way that keyword search on the web still stands in the face of spammers.</p>
<p><strong>Development Issues</strong></p>
<p>Initially it would seem sensible to let Google do a lot of the work for you. Page Rank, Google&#8217;s index of the influence of a web page will be a useful way to weight the importance of a sentiment source. Developers will start with a handful of stocks and get recent mentions of them from automatically querying google news, then try to make the system &#8220;read&#8221; the content and develop a means for assessing confidence in the given stock from the text. Many are quite used to stripping data from unstructured text, and at first just try to do it with keywords. the ambiguity factor will come into it a lot though, eg:</p>
<p>&#8220;&#8230; investor shows high confidence in Volkswagen&#8230;&#8221; : positive<br />
&#8220;&#8230;investors are wrong to place high confidence in Volkswagen&#8230;&#8221; : negative<br />
&#8220;&#8230; is an open question whether to place high confidence in Volkswagen&#8230;&#8221; : neutral</p>
<p>these three snippets might look the same to a system that couldn&#8217;t make very good judgements about context. so a way of discerning opinions has to be quite subtle, more so than just reading lots of text and trying to judge based on the occurrence of phrases. If you develop a way to make a good-enough system by testing on, say, 5 stocks, then scaling up to hundreds would not be substantially harder.</p>
<p>It is about looking for patterns in language so developers will need to collect loads and loads of these patterns, with an interpretation for each. Existing mining techniques are developing to resolve this kind of linguistic problem and much progress. When I was making the Essigned skills search we found that automation wasn&#8217;t very reliable because our system filled itself up with irrelevant words. so we hacked thousands of words by hand which was punishing work. Much of this has already been done in the Sentiment Mining community.</p>
<p>Language is very subtle, but with big data even getting a &#8220;buy&#8221; instruction right 51% of the time gives a 1 % advantage over random choice and might even get you a steady profit&#8230; This is what the pioneering hedge funds are already discovering.</p>
<p>The best way to proceed is to imagine that you had to solve this problem by hand, so you then read lots of financial news and observe how you are interpreting the text to make judgements. Then, when you see patterns emerge in what you do, develop a heuristic and then turn it into code and let the computer do the work for you. This is how sentiment mining is already moving forward.</p>
<p><strong>The Sentiment Ticker &#8211; The Visionary Bit</strong></p>
<p>The markets are a Chaotic Phenomenon (yes, caps). In the early days we knew that because of the Butterfly Effect there was a limit to the accuracy of our predictions. What an individual CEO ate for breakfast might critically alter future outcomes. Now we can move the fine granularity of our perceptions down one stage further because there is more data to trawl. The causal nexus of mass world opinion is a door that is starting to open with sentiment mining. The more honest data that people pour into the vastness of the web, the more of a handle we have on generating good predictions. Yes, the Butterfly Effect still holds, but there has been progress and refinement.</p>
<p>It is in the interests of the burgeoning global mind that people share personal data online. As an aside the online privacy, and data misuse issues still remain, of course. And there has never been a more clear need for ethical practises, fair government and responsible use of data than now.</p>
<p>People still watch conventional media news, like ITN News or BBC, because they want to drill down deeper into world situations for planning and foresight. A service that provides a real time breakdown of sentiment across the planet is a global evolution of the very concept of news, taking us one stage nearer to the retreating goal of perfect information. To be truly &#8220;in tune&#8221; or to have &#8220;one&#8217;s ear to the ground&#8221; investors need to surf the rising tsunami of information with better tools and finer analysis. Competitiveness accelerates too with greater and more timely information The sentiment ticker provides this because it is a microscope into the previously invisible but nonetheless critical machinations and complex flows of world opinion, and human sentiment. </p>
<p>Once one has &#8220;got&#8221; the concept nothing less will satisfy for the data omnivore. People around the world are desperate for any opportunity to scope deeper into the maelstrom of what we are doing as a species.</p>
<p>Markets will accelerate and diversify. Customer relations, sales, branding, indeed any enterprise dependent on rich data, will evolve irreversibly. Politics too will change as voter opinion becomes a 3D, graphically rich continuum into which we can gaze, and through which we can interactively test our ideas. These changes will rock our world-views, but it must also be stressed that they will demand greater responsibility, as increased knowledge always does.</p>
<p>The evolving economy places power in the hands of innovators and those who can exploit novelty, but the sentiment ticker will eventually democratise further too, because anyone with a network connection may achieve further knowledge for empowered decision making. Open information liberates intellectual capital into the ownership of humanity, and the species itself becomes wealthier. As Sentiment Developers we hope to facilitate this process while still profiting through a small appropriate return on the investment of our faith and vision in a revolutionary concept.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pythonism.wordpress.com/914/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pythonism.wordpress.com/914/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pythonism.wordpress.com/914/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pythonism.wordpress.com/914/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pythonism.wordpress.com/914/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pythonism.wordpress.com/914/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pythonism.wordpress.com/914/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pythonism.wordpress.com/914/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pythonism.wordpress.com/914/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pythonism.wordpress.com/914/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pythonism.wordpress.com/914/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pythonism.wordpress.com/914/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pythonism.wordpress.com/914/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pythonism.wordpress.com/914/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pythonism.wordpress.com&amp;blog=3580594&amp;post=914&amp;subd=pythonism&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pythonism.wordpress.com/2011/12/06/new-concept-the-sentiment-ticker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a5395c548819c89c914016d32e44394a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pythonisms</media:title>
		</media:content>
	</item>
		<item>
		<title>Comparing ParallelPython and Picloud</title>
		<link>http://pythonism.wordpress.com/2011/07/11/comparing-parallelpython-and-picloud/</link>
		<comments>http://pythonism.wordpress.com/2011/07/11/comparing-parallelpython-and-picloud/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 01:28:10 +0000</pubDate>
		<dc:creator>Trip Technician</dc:creator>
				<category><![CDATA[internet programming]]></category>
		<category><![CDATA[parallelisation]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[ParallelPython]]></category>
		<category><![CDATA[Picloud]]></category>
		<category><![CDATA[pp]]></category>

		<guid isPermaLink="false">http://pythonism.wordpress.com/?p=890</guid>
		<description><![CDATA[Picloud is a paid cloud computing platform using Python. After signing up you get two login keys and have to install a Python module on the local machine that you will use to send jobs to the cloud. You enter the keys in a config file and Python connects after it sees an &#8220;import cloud&#8221; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pythonism.wordpress.com&amp;blog=3580594&amp;post=890&amp;subd=pythonism&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="https://www.picloud.com/">Picloud</a> is a paid cloud computing platform using Python. After signing up you get two login keys and have to install a Python module on the local machine that you will use to send jobs to the cloud. You enter the keys in a config file and Python connects after it sees an &#8220;import cloud&#8221; line in your code. The fees run at 5 cents for a processor hour. Not a lot.</p>
<p><a href="http://www.parallelpython.com/">Parallel Python</a> is a parallel computing module that works either for clusters or just multi core machines. After &#8220;import pp&#8221; you set up an instance of a parallel server and send computations to it using the methods of the server instance.</p>
<p>Both are very easy to use, so I thought I&#8217;d do some time testing and compare them. </p>
<p><span id="more-890"></span><br />
My machine here at home is a 6 core AMD Phenom with 4GB of RAM (lucky me!). The cores you get from Picloud are 1.2 GHz Xeons. and each has 340MB RAM. Each job will get one of these processors, unless you set a high CPU option in which case each will get 2.5 and 850MB RAM. For these tests I used the high cpu option.</p>
<p>With parallel computing a lot of the art is decomposing a problem into slices that can run on one core each in parallel, usually with some merge code that combines the results from each job into a final answer. Both these systems work by passing the cores a function and a tuple of its inputs, the people at Picloud reckon that with this functional method you still have the power to do anything that an ordinary serial machine can do, and probably faster.</p>
<p>I chose a very simple calculation to perform &#8211; to find the sum of the squares of the first 10,000,000 integers. The range(1,6000000) was split into 10 sub-ranges, one and a bit for each core on my machine, or one for each 2.5 cores on Picloud. There were four tests: </p>
<ul>
<li>local machine using parallel python to send one job to each of my 6 cores</li>
<li>local machine without any parallelisation, just Python computing a function</li>
<li>Picloud with 6 separate parallel jobs each on high CPU, decomposition done on client</li>
<li>Picloud with 6 separate parallel jobs each on high CPU using map function</li>
<li>Picloud without parallelisation, just one high CPU instance for the function</li>
</ul>
<p>We&#8217;ll get to the results in a sec.</p>
<p>The commands used were similar for both systems, and I hope the code is fairly readable. </p>
<p>Here is the code:<br />
<code><br />
import&nbsp;pp<br />
import&nbsp;time<br />
import&nbsp;cloud<br />
<br />
a=pp.Server()<br />
<br />
def&nbsp;sq(x):<br />
&nbsp;&nbsp;&nbsp;&nbsp;"""add&nbsp;all&nbsp;squares&nbsp;between&nbsp;x[0]&nbsp;and&nbsp;x[1]"""<br />
&nbsp;&nbsp;&nbsp;&nbsp;tot=0<br />
&nbsp;&nbsp;&nbsp;&nbsp;for&nbsp;z&nbsp;in&nbsp;range(x[0],x[1]+1):<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tot&nbsp;+=&nbsp;z**2<br />
&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;tot<br />
<br />
inputs&nbsp;=&nbsp;[[1,1000000],<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[1000001,2000000],<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[2000001,3000000],<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[3000001,4000000],<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[4000001,5000000],<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[5000001,6000000],<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[6000001,7000000],<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[7000001,8000000],<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[8000001,9000000],<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[9000001,10000000]]<br />
<br />
#&nbsp;test&nbsp;1<br />
ti=time.time()<br />
answer&nbsp;=&nbsp;sq((1,10000000))<br />
print&nbsp;"local&nbsp;naive&nbsp;method",answer<br />
print&nbsp;"that&nbsp;took",time.time()-ti,"seconds"<br />
<br />
#test&nbsp;2<br />
ti=time.time()<br />
jobs&nbsp;=&nbsp;[]<br />
for&nbsp;x&nbsp;in&nbsp;inputs:<br />
&nbsp;&nbsp;&nbsp;&nbsp;jobs.append(a.submit(sq,(x,)))<br />
answer&nbsp;=&nbsp;0<br />
for&nbsp;z&nbsp;in&nbsp;jobs:<br />
&nbsp;&nbsp;&nbsp;&nbsp;answer&nbsp;+=&nbsp;z()<br />
print&nbsp;"locally&nbsp;parallelised",answer<br />
print&nbsp;"that&nbsp;took",time.time()-ti,"seconds"<br />
<br />
#&nbsp;test&nbsp;3<br />
ti=time.time()<br />
<br />
job3&nbsp;=&nbsp;cloud.call(sq,(1,10000000),_high_cpu=True)<br />
answer&nbsp;=&nbsp;cloud.result(job3)<br />
print&nbsp;"non-parallel&nbsp;on&nbsp;picloud",answer<br />
print&nbsp;"that&nbsp;took",time.time()-ti,"seconds"<br />
<br />
#&nbsp;test&nbsp;4<br />
ti=time.time()<br />
jobs2&nbsp;=&nbsp;[]<br />
for&nbsp;x&nbsp;in&nbsp;inputs:<br />
&nbsp;&nbsp;&nbsp;&nbsp;jobs2.append(cloud.call(sq,x,_high_cpu=True))<br />
answer=0<br />
<br />
for&nbsp;z&nbsp;in&nbsp;jobs2:<br />
&nbsp;&nbsp;&nbsp;&nbsp;answer&nbsp;+=&nbsp;cloud.result(z)<br />
<br />
print&nbsp;"parallel&nbsp;on&nbsp;picloud&nbsp;&nbsp;using&nbsp;cloud.call()",answer<br />
print&nbsp;"that&nbsp;took",time.time()-ti,"seconds"<br />
<br />
#&nbsp;test&nbsp;5<br />
ti=time.time()<br />
jobs2&nbsp;=&nbsp;cloud.map(sq,inputs,_high_cpu=True)<br />
answer&nbsp;=&nbsp;sum(cloud.result(jobs2))<br />
<br />
print&nbsp;"parallel&nbsp;on&nbsp;picloud&nbsp;using&nbsp;cloud.map()",answer<br />
print&nbsp;"that&nbsp;took",time.time()-ti,"seconds"<br />
</code></p>
<p>and here is the output. </p>
<p><a href="http://pythonism.files.wordpress.com/2011/07/screenshot-python-shell.png"><img src="http://pythonism.files.wordpress.com/2011/07/screenshot-python-shell.png?w=510&#038;h=523" alt="" title="Screenshot-Python Shell" width="510" height="523" class="alignnone size-full wp-image-901" /></a></p>
<p>The slowest was the local machine without parallel, so that is not so surprising. My own machine with parallel code was similar to Picloud with badly designed parallel code that didn&#8217;;t take advantage of the cloud.map() function. Picloud used like it should be with map() was the best&#8230;whahey!!</p>
<p>This is far from complete and I would be interested if anyone wants to duplicate or extend what I have suggested here. I might suggest that if the scale of the task was increased these rankings might change, perhaps reducing any effects of latency and other bottlenecks. Also I didn&#8217;t push the RAM envelope.</p>
<p>Another thing worth mentioning is that Python, being interpreted, will be a lot slower than a multiple processor system using c++. I love the language though so I will continue to use both these systems, and dream about doing something original with them. Picloud also includes a simulator so you can test and debug code on the local machine without paying until everything&#8217;s perfect.</p>
<p>Cheers Picloud <del datetime="2011-07-16T16:12:24+00:00">and how about cancelling my 1 cent bill as a token of thanks for the free advert !!</del> and special thanks to Aaron for his feedback.</p>
<p>Cheers also to Parallel Python&#8230; it gets the Pythonisms simplicity award.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pythonism.wordpress.com/890/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pythonism.wordpress.com/890/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pythonism.wordpress.com/890/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pythonism.wordpress.com/890/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pythonism.wordpress.com/890/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pythonism.wordpress.com/890/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pythonism.wordpress.com/890/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pythonism.wordpress.com/890/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pythonism.wordpress.com/890/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pythonism.wordpress.com/890/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pythonism.wordpress.com/890/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pythonism.wordpress.com/890/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pythonism.wordpress.com/890/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pythonism.wordpress.com/890/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pythonism.wordpress.com&amp;blog=3580594&amp;post=890&amp;subd=pythonism&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pythonism.wordpress.com/2011/07/11/comparing-parallelpython-and-picloud/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a5395c548819c89c914016d32e44394a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pythonisms</media:title>
		</media:content>

		<media:content url="http://pythonism.files.wordpress.com/2011/07/screenshot-python-shell.png" medium="image">
			<media:title type="html">Screenshot-Python Shell</media:title>
		</media:content>
	</item>
		<item>
		<title>Over-abstracting -&gt; bullshit</title>
		<link>http://pythonism.wordpress.com/2011/02/25/over-abstracting-bullshit/</link>
		<comments>http://pythonism.wordpress.com/2011/02/25/over-abstracting-bullshit/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 18:58:00 +0000</pubDate>
		<dc:creator>Trip Technician</dc:creator>
				<category><![CDATA[Creative Writing]]></category>
		<category><![CDATA[abstraction]]></category>
		<category><![CDATA[big-society]]></category>
		<category><![CDATA[bullshit]]></category>

		<guid isPermaLink="false">http://pythonism.wordpress.com/?p=883</guid>
		<description><![CDATA[Amidst the chaos of so much important activity in the world right now, particularly in the middle east, I sometimes find it hard to reliably concentrate on the immediate task. I am in the middle of working on a complex website, and earlier today had problems. But reflecting on these I was struck by a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pythonism.wordpress.com&amp;blog=3580594&amp;post=883&amp;subd=pythonism&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Amidst the chaos of so much important activity in the world right now, particularly in the middle east, I sometimes find it hard to reliably concentrate on the immediate task. I am in the middle of working on a complex website, and earlier today had problems. But reflecting on these I was struck by a political analogy. Trying to start a web development project and having a problem setting up Apache is after all like trying to get to a business meeting but having to fix your car on the way &#8211; you get this unpleasant feeling of being sidetracked ! But sidetracks are always there in unstructured maelstrom of real life away from the keyboard, where bosses or pupils need attention, and communication is so critical but ever impossible to perfect.</p>
<p><span id="more-883"></span><br />
The general impression I have received about this new idea of &#8220;The Big Society&#8221; is that no one is quite sure what it is supposed to mean. This maybe because of various errors made by our prime minister, in which he has failed to be a very good logician, I&#8217;ll try to communicate this idea.</p>
<p>In computer programming we have a very important concept called abstraction. Many people will be familiar with the contrasts between the particular and the general in practical daily life, so I&#8217;ll start with an analogy. In business a greengrocer might broaden her market share by starting to sell sweets as well as veg. She is making her operations more multi-purpose. If she then starts to do a stand of newspapers and other basic provisions then its easy to see that she is generalising away from the specific of veg into a range of different product categories, but ones that can still be run using her initial set of &#8220;selling retail goods&#8221; skills that she learned as a grocer. </p>
<p>This process is abstraction, in computers we often start with code that processes a unique set of one-off data. But then as the task matures we decide slowly to allow our program to work on different sets of similar data and then perhaps later different formats of more different data&#8230; and then later again design for different platforms or different user styles. That way systems are portable and more marketable too. By making our systems more general in what they can handle we save work by enabling the transfer of technologies from one domain to another. This is also the power of mathematics which is comfortable with facts like &#8220;3 apples plus 2 apples makes 5 apples&#8221; which is plainly amenable to the generalisation that &#8220;3 of anything plus 2 of the same thing = 5 of that thing&#8221;. indeed numbers are the very most general of all concepts.</p>
<p>In programming we also have another useful concept which i&#8217;d like to bring in to this discussion which is that of levels of description. This concept is related to abstraction. It is really about building blocks. So much of our work is about algorithms, and every algorithm has a description. these days the description however becomes amenable to a kind of shorthand. If I give you instructions (like an algorithm) to make me a cup of tea, I would usually leave out all the minor details like &#8220;first make sure the kettle is plugged in at the wall&#8221; since I would assume you didn&#8217;t need that kind of level of task verbosity. indeed you might find it condescending to receive instructions like this because we all assume an ability to solve such simple problems. (On another angle try getting a robot to do this though&#8230;)</p>
<p>The computational &#8220;jacob&#8217;s ladder&#8221; of machine code to low level code as the bottom rungs and higher levels of abstraction on the way up is a part of the very fundamentals of how to build complexity in our systems which most computer programmers know a good bit about. I sometimes wonder about trying to start a kind of open conspiracy where us geeks buried up to our elbows in code and data are finally recognised as the ones who should truly be in charge. To me a government is a complex system, and an inefficient bureaucracy perhaps something like a &#8216;legacy system&#8217; written in some dinosaurish and  inefficient langauge like COBOL. Mastering and organising the huge data that comes to you must be one of the parts of government, and correct planning based on this data sounds like a classic AI problem.</p>
<p>Much good human communication is very high level in terms of its abstractions but there are different styles for this and arguments we disagree with are often built upon philosophical &#8220;platforms&#8221; we dislike and thus may deem &#8220;buggy&#8221; like bad software, while aficionadoes will defend their own chosen philosophical technology. An individual&#8217;s political views are often like this, left and right wing each being like a different operating system, say windows, mac or linux. But the lesson of the sofware analogy is that these turf wars are more futile than trying to build common ground. Standards are everywhere and are usually seen as progress because they overcome the Tower of Babel effect and let us or our systems talk.</p>
<p>Maybe this is why some of us the find the pat language of gurus and charismatics so transparent, unless of course we are under their spell, it is because they utter such powerful sounding (but ultimately insubstantial) generalisations that masquerade as wisdom but being devoid of ay specific examples will soon fall down in the messiness of the real world. This could apply also to the nigh-universally applicable dicta of horoscopes but frankly I find it applies best right now to the words of David Cameron in his talk about the &#8220;big society.&#8221;</p>
<p>The big society sounds like a kind of ultimate high-level concept, a vision that might guide us. The lesson though from programming is that abstraction is always leaky and thus the grass roots of ordinary processes, think of a kind of societal stream of ones and zeros rolling dwn a matrix like greenscreen, is the only place to start. But this is something that Cameron doesn&#8217;t seem to be very good at. Indeed to insulate yourself from the rabble is a part of such a leader&#8217;s classy image, and is counterproductive in the same way as a programmer who doesn&#8217;t study their data enough.</p>
<p>With establishing new skills, especially in complex areas, finding your own comfortable learning path that leads in to the subject at hand is crucial. what is your personal way or style with which you solve this problem ? Some programmers take existing  pre writtencode from libraries on trust, others favour a lower level and build up from the basics, while the others say they are wasting time reinventing the wheel. It&#8217;s an open debate but an interesting one because I have always felt that reinventing the wheel may mean you come up with a new original approach. If you want something done properly do it yourself is of course another dictum that casts different political styles into relief. Again we programmers have to deal with these issues daily. I&#8217;ve never set up Apache on Ubuntu before for example&#8230; so its a trip around the web techie forums for me later, having of course to try and sift the incorrect how-to data from that authored by the real experts, some of whom are modest and don&#8217;t blare their knowledge from the rooftops or make public party broadcasts !</p>
<p>Learning to encode  so much data in textual or tagged forms has been great fun, with general skills and aha insights being acquired all the time to keep my sense of motivation and accomplishment sweet. I want to follow my open-source government ideas more because we all should have the freedom of information (or the wiki-leakability) at heart when designing the complex code of nation-management, and progress comes through sharing our code also.</p>
<p>I wonder what are the evolutionary algorithms that we and our brains use in all this? Or whether what the brain does is even algorithmic? In writing code we learn to manage big complexity consciously and intentionally but the magical subconscious processes in the brain are doing that all the time without us knowing. Indeed the fashionable current insight is that object recognition (where&#8217;s that kettle?) is a much greater and harder act of cognition than equation solving or chess&#8230; Our leaders are often past masters at subconsciously guiding themselves up the slippery pole too. The compuational wonder and richness of ordinary life acts against this though, maybe degrees in high falutin economics are less satisfactory as skills than hard nosed experience in running a greengrocer&#8217;s. Such intellectual elitism is partly marketing and branding these days, I&#8217;d trust the data.</p>
<p>Recognising glyphs or letters is at first a game of geometric pattern recognition to the learning child, but later we view it as linguistic. are programming languages like natural languages, yes there is still logic, semantics and syntax, many similarities. All of what we do can be termed &#8220;General Intelligence&#8221; which so many boffins around the world are dreaming of implementing in silico as &#8220;Artificial General Intelligence&#8221; right now.</p>
<p>A database saves memory by reading rows or columns one at a time, must be like this or none of our favoruite webistes would work. SQL &#8211; Structured Query Language is again a generalisation of how to phrase questions of any simple type, this lies beyond merely computer databases and is an abstraction of what all data retrieval processes share in common. Code clarifies thinking skills, UML &#8211; the Unified Modelling Language is also a generalisation of modelling any process / structure visually in pretty diagrams or textually in a language. The formalisation of good coding style or notation is a generalisation of any social knowledge sharing process where we need common protocols. What should we take on trust &#8211; lots usually! But we must also have a &#8220;smart trust module &#8220;that involves wisdom and skepticism too ! It&#8217;s only good news when that kicks in in trying to understand what our government is saying to us.</p>
<p>Was complexity built in the brain in the same way ? kind of &#8220;lower animals think in machine code&#8221;. and moreover in this kind of complexity you need to take many code objects on trust. the very use of natural language is a social act, our definitions and concepts are part of mental software libraries whose origins lie in past history. </p>
<p>When we or often our children ask some questions like &#8220;why do birds fly ?&#8221; one hallmark of a credible answer is often to use abstraction. (I had to use this in some Prolog code I recently wrote). In programming we might say that &#8220;animal&#8221; is a superclass of &#8220;bird&#8221;, an explanation comes: &#8220;because all animals have means of locomotion, and a bird does this by locomoting through the air, that&#8217;s why they have wings&#8221; instance -&gt; class -&gt; inherited property. </p>
<p>This explanation sounds good because it is bandying around an abstraction and referring to that instead of the actual case under question. How detailed after all do you want your answer to be ? Completeness wants evry relevant fact but so often the constraints of soundbiting do limit us. So many politicians do this generalisation trick, but its more psychology than effective explanation, because we think that the (often academic) categories of knowledge are set in stone and a matter of weighty authority. </p>
<p>Us coders are natural radicals though because we have to respect what works rather than what the theory says will work, and this often means drilling down to the detail of individual cases to get a real feel for the data. This is like grass roots politics too ! I just wish our leaders would do this drilling down more often and sample the raw data of ordinary peoples&#8217; lives a little better before they think they have captured that great abstraction in the sky !</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pythonism.wordpress.com/883/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pythonism.wordpress.com/883/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pythonism.wordpress.com/883/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pythonism.wordpress.com/883/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pythonism.wordpress.com/883/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pythonism.wordpress.com/883/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pythonism.wordpress.com/883/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pythonism.wordpress.com/883/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pythonism.wordpress.com/883/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pythonism.wordpress.com/883/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pythonism.wordpress.com/883/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pythonism.wordpress.com/883/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pythonism.wordpress.com/883/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pythonism.wordpress.com/883/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pythonism.wordpress.com&amp;blog=3580594&amp;post=883&amp;subd=pythonism&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pythonism.wordpress.com/2011/02/25/over-abstracting-bullshit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a5395c548819c89c914016d32e44394a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pythonisms</media:title>
		</media:content>
	</item>
		<item>
		<title>a simple learning program using pyswip</title>
		<link>http://pythonism.wordpress.com/2011/02/05/a-simple-learning-program-using-pyswip/</link>
		<comments>http://pythonism.wordpress.com/2011/02/05/a-simple-learning-program-using-pyswip/#comments</comments>
		<pubDate>Sat, 05 Feb 2011 12:16:42 +0000</pubDate>
		<dc:creator>Trip Technician</dc:creator>
				<category><![CDATA[Formal Logic]]></category>
		<category><![CDATA[Natural Language Processing]]></category>
		<category><![CDATA[Prolog]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[cousin]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[prolog]]></category>
		<category><![CDATA[pyswip]]></category>

		<guid isPermaLink="false">http://pythonism.wordpress.com/?p=879</guid>
		<description><![CDATA[I really enjoyed making this work. the &#8220;hypothesising that cousins might share properties&#8221; was my own idea. #&#160;'philosopher.py'&#160;a&#160;basic&#160;chatbot&#160;learning&#160;system #&#160;using&#160;pyswip&#160;which&#160;interfaces&#160;python&#160;and&#160;swi-prolog from&#160;pyswip&#160;import&#160;* from&#160;random&#160;import&#160;choice #&#160;start&#160;a&#160;Prolog&#160;interpreter&#160;instance p=Prolog() #&#160;load&#160;the&#160;ontology&#160;specification p.consult("c.pl") #&#160;construct&#160;look&#160;up&#160;tables&#160;of&#160;common&#160;facts&#160; properties&#160;=&#160;list(p.query("property(X,Y)")) categories&#160;=&#160;list(p.query("parent(X,Y)")) cousins&#160;=&#160;list(p.query("cousin(X,Y)")) #&#160;prepare&#160;for&#160;saving&#160;of&#160;new&#160;inferences new_prolog_code&#160;=&#160;open('d.pl','w') new_facts&#160;=&#160;[] def&#160;say_property_fact(): &#160;&#160;&#160;&#160;"""chooses&#160;a&#160;random&#160;fact&#160;about&#160;one&#160;of&#160;a&#160;category's &#160;&#160;&#160;&#160;properties&#160;and&#160;states&#160;it""" &#160;&#160;&#160;&#160;selected_fact=choice(properties) &#160;&#160;&#160;&#160;return&#160;selected_fact['Y']+'s&#160;'+selected_fact['X'] def&#160;say_category_fact(): &#160;&#160;&#160;&#160;"""chooses&#160;a&#160;random&#160;fact&#160;about&#160;category&#160;membership &#160;&#160;&#160;&#160;and&#160;states&#160;it""" &#160;&#160;&#160;&#160;selected_fact=choice(categories) &#160;&#160;&#160;&#160;return&#160;'a&#160;'+selected_fact['Y']+'&#160;is&#160;a&#160;kind&#160;of&#160;'+selected_fact['X'] def&#160;ask_cousin_property(): &#160;&#160;&#160;&#160;"""hypothesises&#160;that&#160;cousins&#160;share&#160;properties &#160;&#160;&#160;&#160;and&#160;asks&#160;for&#160;confirmation,&#160;saving&#160;new&#160;code&#160;if&#160;yes""" &#160;&#160;&#160;&#160;cousin_pair&#160;=&#160;choice(cousins) &#160;&#160;&#160;&#160;props&#160;=&#160;list(p.query("property(X,"+cousin_pair['Y']+")")) &#160;&#160;&#160;&#160;possible_property&#160;&#160;=&#160;choice(props) &#160;&#160;&#160;&#160;print&#160;'does&#160;a&#160;'+cousin_pair['X']+'&#160;'+possible_property['X']+'?' &#160;&#160;&#160;&#160;a=&#160;raw_input('y&#160;or&#160;n') &#160;&#160;&#160;&#160;if&#160;a&#160;==&#160;'y': &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;new_facts.append('property('+possible_property['X']+','+cousin_pair['X']+').\n') &#160;&#160;&#160;&#160;else: &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pythonism.wordpress.com&amp;blog=3580594&amp;post=879&amp;subd=pythonism&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I really enjoyed making this work. the &#8220;hypothesising that cousins might share properties&#8221; was my own idea.</p>
<p><code><br />
#&nbsp;'philosopher.py'&nbsp;a&nbsp;basic&nbsp;chatbot&nbsp;learning&nbsp;system<br />
#&nbsp;using&nbsp;pyswip&nbsp;which&nbsp;interfaces&nbsp;python&nbsp;and&nbsp;swi-prolog<br />
<br />
from&nbsp;pyswip&nbsp;import&nbsp;*<br />
from&nbsp;random&nbsp;import&nbsp;choice<br />
<br />
#&nbsp;start&nbsp;a&nbsp;Prolog&nbsp;interpreter&nbsp;instance<br />
p=Prolog()<br />
<br />
#&nbsp;load&nbsp;the&nbsp;ontology&nbsp;specification<br />
p.consult("c.pl")<br />
<br />
#&nbsp;construct&nbsp;look&nbsp;up&nbsp;tables&nbsp;of&nbsp;common&nbsp;facts&nbsp;<br />
properties&nbsp;=&nbsp;list(p.query("property(X,Y)"))<br />
categories&nbsp;=&nbsp;list(p.query("parent(X,Y)"))<br />
cousins&nbsp;=&nbsp;list(p.query("cousin(X,Y)"))<br />
<br />
#&nbsp;prepare&nbsp;for&nbsp;saving&nbsp;of&nbsp;new&nbsp;inferences<br />
new_prolog_code&nbsp;=&nbsp;open('d.pl','w')<br />
new_facts&nbsp;=&nbsp;[]<br />
<br />
def&nbsp;say_property_fact():<br />
&nbsp;&nbsp;&nbsp;&nbsp;"""chooses&nbsp;a&nbsp;random&nbsp;fact&nbsp;about&nbsp;one&nbsp;of&nbsp;a&nbsp;category's<br />
&nbsp;&nbsp;&nbsp;&nbsp;properties&nbsp;and&nbsp;states&nbsp;it"""<br />
&nbsp;&nbsp;&nbsp;&nbsp;selected_fact=choice(properties)<br />
&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;selected_fact['Y']+'s&nbsp;'+selected_fact['X']<br />
<br />
def&nbsp;say_category_fact():<br />
&nbsp;&nbsp;&nbsp;&nbsp;"""chooses&nbsp;a&nbsp;random&nbsp;fact&nbsp;about&nbsp;category&nbsp;membership<br />
&nbsp;&nbsp;&nbsp;&nbsp;and&nbsp;states&nbsp;it"""<br />
&nbsp;&nbsp;&nbsp;&nbsp;selected_fact=choice(categories)<br />
&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;'a&nbsp;'+selected_fact['Y']+'&nbsp;is&nbsp;a&nbsp;kind&nbsp;of&nbsp;'+selected_fact['X']<br />
<br />
def&nbsp;ask_cousin_property():<br />
&nbsp;&nbsp;&nbsp;&nbsp;"""hypothesises&nbsp;that&nbsp;cousins&nbsp;share&nbsp;properties<br />
&nbsp;&nbsp;&nbsp;&nbsp;and&nbsp;asks&nbsp;for&nbsp;confirmation,&nbsp;saving&nbsp;new&nbsp;code&nbsp;if&nbsp;yes"""<br />
&nbsp;&nbsp;&nbsp;&nbsp;cousin_pair&nbsp;=&nbsp;choice(cousins)<br />
&nbsp;&nbsp;&nbsp;&nbsp;props&nbsp;=&nbsp;list(p.query("property(X,"+cousin_pair['Y']+")"))<br />
&nbsp;&nbsp;&nbsp;&nbsp;possible_property&nbsp;&nbsp;=&nbsp;choice(props)<br />
&nbsp;&nbsp;&nbsp;&nbsp;print&nbsp;'does&nbsp;a&nbsp;'+cousin_pair['X']+'&nbsp;'+possible_property['X']+'?'<br />
&nbsp;&nbsp;&nbsp;&nbsp;a=&nbsp;raw_input('y&nbsp;or&nbsp;n')<br />
&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;a&nbsp;==&nbsp;'y':<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;new_facts.append('property('+possible_property['X']+','+cousin_pair['X']+').\n')<br />
&nbsp;&nbsp;&nbsp;&nbsp;else:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
#&nbsp;uncheck&nbsp;to&nbsp;say&nbsp;some&nbsp;facts&nbsp;as&nbsp;a&nbsp;test<br />
#print&nbsp;say_property_fact()&nbsp;<br />
#print&nbsp;say_category_fact()<br />
<br />
#&nbsp;does&nbsp;a&nbsp;training&nbsp;run&nbsp;and&nbsp;saves&nbsp;new&nbsp;inferences<br />
<br />
response&nbsp;=&nbsp;''<br />
<br />
while&nbsp;response&nbsp;==&nbsp;'':<br />
&nbsp;&nbsp;&nbsp;&nbsp;ask_cousin_property()<br />
&nbsp;&nbsp;&nbsp;&nbsp;response&nbsp;=&nbsp;raw_input('quit&nbsp;?')<br />
<br />
new_set_of_facts&nbsp;=&nbsp;list(set(new_facts))<br />
<br />
for&nbsp;x&nbsp;in&nbsp;new_set_of_facts:<br />
&nbsp;&nbsp;&nbsp;&nbsp;new_prolog_code.write(x)<br />
<br />
new_prolog_code.close()<br />
<br />
print&nbsp;"thank&nbsp;you,&nbsp;'philosopher'&nbsp;has&nbsp;learned&nbsp;something&nbsp;new"<br />
</code></p>
<p><span id="more-879"></span></p>
<p><code><br />
/*&nbsp;c.pl&nbsp;*/<br />
/*&nbsp;ONTOLOGY&nbsp;*/<br />
<br />
/*&nbsp;categories&nbsp;*/<br />
<br />
parent(thing,person).<br />
parent(person,man).<br />
parent(person,woman).<br />
parent(thing,vehicle).<br />
parent(vehicle,tractor).<br />
parent(vehicle,car).<br />
parent(tractor,massey).<br />
parent(thing,animal).<br />
parent(thing,plant).<br />
parent(thing,place).<br />
parent(plant,flower).<br />
parent(plant,vegetable).<br />
parent(plant,tree).<br />
parent(animal,dog).<br />
parent(animal,cat).<br />
parent(place,house).<br />
<br />
/*&nbsp;properties&nbsp;*/<br />
<br />
property(exist,thing).<br />
property(live,person).<br />
property(live,animal).<br />
property(live,plant).<br />
property(think,person).<br />
property(move,vehicle).<br />
property(plough,tractor).<br />
property(grow,plant).<br />
property(eat,animal).<br />
property(move,man).<br />
property(move,woman).<br />
<br />
/*&nbsp;rules&nbsp;*/<br />
<br />
property(X,Y)&nbsp;:-&nbsp;parent(Q,Y),<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;property(X,Q).<br />
<br />
child(X,Y)&nbsp;:-&nbsp;parent(Y,X).<br />
<br />
sibling(X,Y)&nbsp;:-&nbsp;parent(Z,X),<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parent(Z,Y),<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;X&nbsp;\==&nbsp;Y.<br />
<br />
ancestor(X,Y)&nbsp;:-&nbsp;parent(X,Y).<br />
ancestor(X,Y)&nbsp;:-&nbsp;parent(X,Z),<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ancestor(Z,Y).<br />
<br />
cousin(X,Y)&nbsp;:-&nbsp;parent(P,X),<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parent(Q,Y),<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parent(R,Q),<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parent(R,P),<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;P&nbsp;\==&nbsp;Q.<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pythonism.wordpress.com/879/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pythonism.wordpress.com/879/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pythonism.wordpress.com/879/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pythonism.wordpress.com/879/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pythonism.wordpress.com/879/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pythonism.wordpress.com/879/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pythonism.wordpress.com/879/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pythonism.wordpress.com/879/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pythonism.wordpress.com/879/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pythonism.wordpress.com/879/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pythonism.wordpress.com/879/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pythonism.wordpress.com/879/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pythonism.wordpress.com/879/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pythonism.wordpress.com/879/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pythonism.wordpress.com&amp;blog=3580594&amp;post=879&amp;subd=pythonism&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pythonism.wordpress.com/2011/02/05/a-simple-learning-program-using-pyswip/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a5395c548819c89c914016d32e44394a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pythonisms</media:title>
		</media:content>
	</item>
		<item>
		<title>minimal text encryption</title>
		<link>http://pythonism.wordpress.com/2011/01/27/minimal-text-encryption/</link>
		<comments>http://pythonism.wordpress.com/2011/01/27/minimal-text-encryption/#comments</comments>
		<pubDate>Thu, 27 Jan 2011 09:51:07 +0000</pubDate>
		<dc:creator>Trip Technician</dc:creator>
				<category><![CDATA[encryption]]></category>
		<category><![CDATA[Programming tips]]></category>

		<guid isPermaLink="false">http://pythonism.wordpress.com/?p=867</guid>
		<description><![CDATA[I came up with an idea for a &#8220;toy&#8221; text encryption program, mainly focussing on how simple I could make it to see what python can do in quite short and readable code. The first one I tried was this: # pythonic ultra simple encryption alphabet = 'abcdefghijklmnopqrstuvwxyz .,;:?!' coder = dict(zip(alphabet,alphabet[::-1])) def scramble(message): &#160;&#160;&#160;&#160;return ''.join([coder[x] for x in message]) text = 'hello, this is my simple text encryption program.' print "message is:           ",text c = scramble(text) print "coded message is:     ",c print "decoded message is:   ",scramble(c) and the output looks like [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pythonism.wordpress.com&amp;blog=3580594&amp;post=867&amp;subd=pythonism&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I came up with an idea for a &#8220;toy&#8221; text encryption program, mainly focussing on how simple I could make it to see what python can do in quite short and readable code. The first one I tried was this:</p>
<p><code># pythonic ultra simple encryption<br />
</code><code><br />
alphabet = 'abcdefghijklmnopqrstuvwxyz .,;:?!'<br />
coder = dict(zip(alphabet,alphabet[::-1]))<br />
</code><code><br />
def scramble(message):<br />
&nbsp;&nbsp;&nbsp;&nbsp;return ''.join([coder[x] for x in message])<br />
</code><code><br />
text = 'hello, this is my simple text encryption program.'<br />
</code><code><br />
print "message is:           ",text<br />
c = scramble(text)<br />
print "coded message is:     ",c<br />
print "decoded message is:   ",scramble(c)<br />
</code></p>
<p><span id="more-867"></span><br />
and the output looks like this, just to make sure it works</p>
<p><code>&gt;&gt;&gt;<br />
message is:        hello, this is my simple text encryption program.<br />
coded message is:  y,uurecmyxncxncthcnxtqu,cm,imc,s ohqmxrscqorzo!tf<br />
decoded message is:hello, this is my simple text encryption program.<br />
&gt;&gt;&gt; </code></p>
<p>I wondered if it could be made any shorter, and I did away with using dictionaries, which trimmed it down.</p>
<p><code><br />
# another way to do a cipher<br />
# less pythonic but shorter<br />
</code><code><br />
alphabet='abcdefghijklmnopqrstuvwxyz.,; ?!'<br />
</code><code><br />
def scramble(message):<br />
&nbsp;&nbsp;&nbsp;&nbsp;a=''<br />
&nbsp;&nbsp;&nbsp;&nbsp;for x in message:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a+=alphabet[::-1][alphabet.index(x)]<br />
&nbsp;&nbsp;&nbsp;&nbsp;return a<br />
</code></p>
<p>finally I used list comprehensions instead of a for loop and that shortened it even further.</p>
<p><code><br />
# another way to do a cipher<br />
# uses list comprehensions<br />
# shortest one<br />
</code><code><br />
alphabet='abcdefghijklmnopqrstuvwxyz.,; ?!'<br />
</code><code><br />
def scramble(message):<br />
&nbsp;&nbsp;&nbsp;&nbsp;return ''.join([alphabet[::-1][alphabet.index(x)] for x in message])<br />
</code></p>
<p>this one is thanks to Mark Dufour and uses a method from the string module:</p>
<p><code><br />
import string<br />
alphabet='abcdefghijklmnopqrstuvwxyz.,; ?!'<br />
</code><code><br />
def scramble(message):<br />
&nbsp;&nbsp;&nbsp;&nbsp;return message.translate(string.maketrans(alphabet, alphabet[::-1]))<br />
</code></p>
<p>Which one do you prefer ? Can anyone do better ? Post your results please.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pythonism.wordpress.com/867/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pythonism.wordpress.com/867/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pythonism.wordpress.com/867/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pythonism.wordpress.com/867/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pythonism.wordpress.com/867/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pythonism.wordpress.com/867/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pythonism.wordpress.com/867/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pythonism.wordpress.com/867/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pythonism.wordpress.com/867/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pythonism.wordpress.com/867/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pythonism.wordpress.com/867/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pythonism.wordpress.com/867/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pythonism.wordpress.com/867/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pythonism.wordpress.com/867/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pythonism.wordpress.com&amp;blog=3580594&amp;post=867&amp;subd=pythonism&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pythonism.wordpress.com/2011/01/27/minimal-text-encryption/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a5395c548819c89c914016d32e44394a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pythonisms</media:title>
		</media:content>
	</item>
		<item>
		<title>Pythonic minimal factoriser</title>
		<link>http://pythonism.wordpress.com/2010/12/14/pythonic-minimal-factoriser/</link>
		<comments>http://pythonism.wordpress.com/2010/12/14/pythonic-minimal-factoriser/#comments</comments>
		<pubDate>Tue, 14 Dec 2010 14:35:53 +0000</pubDate>
		<dc:creator>Trip Technician</dc:creator>
				<category><![CDATA[Math]]></category>
		<category><![CDATA[factorisation]]></category>
		<category><![CDATA[factoriser]]></category>
		<category><![CDATA[pythonic]]></category>

		<guid isPermaLink="false">http://pythonism.wordpress.com/?p=855</guid>
		<description><![CDATA[I like the succinctness of this bit of code, the recursive termination clause doesn&#8217;t use a conditional, and the output of the function contains the input number + the list in it until it terminates when it returns just the list. I challenge anyone with boldness and aplomb to come up with shorter code if [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pythonism.wordpress.com&amp;blog=3580594&amp;post=855&amp;subd=pythonism&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I like the succinctness of this bit of code, the recursive termination clause doesn&#8217;t use a conditional, and the output of the function contains the input number + the list in it until it terminates when it returns just the list. I challenge anyone with boldness and aplomb to come up with shorter code if they dare !!</p>
<p><code><br />
def&nbsp;fac(a,b):<br />
&nbsp;&nbsp;&nbsp;&nbsp;for&nbsp;x&nbsp;in&nbsp;range(2,int(a**0.5+1)):<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;a%x==0:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;b.append(x)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a/=x<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;fac(a,b)<br />
&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;b<br />
</code><code><br />
print&nbsp;fac(1260,[])<br />
</code><br />
<code>&gt;&gt;&gt;&nbsp;<br />
[2,&nbsp;2,&nbsp;3,&nbsp;3,&nbsp;5]<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pythonism.wordpress.com/855/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pythonism.wordpress.com/855/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pythonism.wordpress.com/855/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pythonism.wordpress.com/855/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pythonism.wordpress.com/855/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pythonism.wordpress.com/855/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pythonism.wordpress.com/855/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pythonism.wordpress.com/855/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pythonism.wordpress.com/855/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pythonism.wordpress.com/855/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pythonism.wordpress.com/855/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pythonism.wordpress.com/855/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pythonism.wordpress.com/855/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pythonism.wordpress.com/855/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pythonism.wordpress.com&amp;blog=3580594&amp;post=855&amp;subd=pythonism&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pythonism.wordpress.com/2010/12/14/pythonic-minimal-factoriser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a5395c548819c89c914016d32e44394a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pythonisms</media:title>
		</media:content>
	</item>
		<item>
		<title>why #wikileaks is one symptom of an approaching singularity</title>
		<link>http://pythonism.wordpress.com/2010/12/05/why-wikileaks-is-one-symptom-of-an-approaching-singularity/</link>
		<comments>http://pythonism.wordpress.com/2010/12/05/why-wikileaks-is-one-symptom-of-an-approaching-singularity/#comments</comments>
		<pubDate>Sun, 05 Dec 2010 21:00:03 +0000</pubDate>
		<dc:creator>Trip Technician</dc:creator>
				<category><![CDATA[Creative Writing]]></category>
		<category><![CDATA[wikileaks]]></category>
		<category><![CDATA[julian-assange]]></category>
		<category><![CDATA[singularity]]></category>

		<guid isPermaLink="false">http://pythonism.wordpress.com/?p=845</guid>
		<description><![CDATA[wikileaks and the singularity ? but how ? &#8230;I&#8217;ll tell you : Because the sheer ease of copying and releasing computer based data has become such that this free sharing of it using IT can only get ever more intense from now on. In the old days the image was of a raincoated and depressed [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pythonism.wordpress.com&amp;blog=3580594&amp;post=845&amp;subd=pythonism&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>wikileaks and the singularity ? but how ?</p>
<p><a href="http://88.80.13.160/"><img src="http://english.ruvr.ru/data/2010/10/26/1210345812/240px-Wikileaks_logo_svg%20copy.jpg" width="150px"></a></p>
<p>&#8230;I&#8217;ll tell you : Because the sheer ease of copying and releasing computer based data has become such that this free sharing of it using IT can only get ever more intense from now on. In the old days the image was of a raincoated and depressed looking guy whose upper lip was sweating gently as he carried his attache case across some border. a sadly unreliable and rather dangerous way compared to merely adding an email attachment ! Now we know it is an angry co-worker who simply copies onto a stick, ftps it, or sends a so-innocent looking email. And the leak is done ! Nearer Singularity I believe secrecy will become rare indeed for governments and Corporations particularly. The same increasing computerisation that is taking us towards what might become a singularity is making itself felt right now in a power shift between monolithic slow moving organisations and fast and light small groups with tech savvy and ideals enough to force restructurings in the world order.</p>
<p><span id="more-845"></span><br />
I see wikileaks as an open source process. We have open sourced and de obfuscated the code of what is a huge data-reserve of some very deprecated, very legacy systems. Now all the open source journalism and political hackers can take their turns and try and improve this code, and let&#8217;s hope that will carry some of those oft repeated benefits that follow from making the analogy with software.</p>
<p>Of course, though, one can get carried away by mainlining Twitter and build a passionate hope in the one true revolution, but as long as police and military have all the guns what can we do except boot up and keep imagining we are freer, while outside our doors the cop cars whine and the sheepwalkers still shamble.</p>
<p>It has helped my understanding though to start looking out for concrete stages and milestones as connectivity revolutionises everything and Assange&#8217;s organisation is a significant phenomena. Naysayers and those who sneer might take notice of the obvious fact that even if every wikileaker was assassinated hundreds more would spring up from among the netizens of the world. The internet itself cannot be taken down either of course, short of a totalitarian dictatorship. this is what some of these types may want. That&#8217;s why the time is now.</p>
<p>Sure, some secrecy is still needed in a complex world. Hackers or moles who released DIY Bio/Nano threats are a cliche by now, but this cablegate is of a different flavour. it shows again and again the contempt and arrogance of those in power, as they present to us their brave shining heroism in pursuing all the goals outlined in their propaganda, creating peace, giving jobs to the poor, while the wiki-maginfying glass shows the small print of manipulation and plotting of those ever in quest of more wealth and control of the masses.</p>
<p>Twiter has been a great tool in this. the last time we all got so excited was in the green uprising in iran, where twitter came to life so beautifully. Now we have been shown that a government with that winning confident smile and perfect teeth, the US, has pooped in its own front yard so many times its become a health hazard. A trumped up rape charge is such a seedy and cack handed weapon to throw against Julian, especially since it must be obvious that wikileaks would continue to roll even if he was taken in to custody, thanks to the several hundred mirror sites that decent &#8220;netizens&#8221; (who may not even want to be &#8220;citizens&#8221; in the original definition anymore) and the barrage of VPSes now filled with TB of leaked data around the world. So one alleged rapist is more important than all those on the swedish sex offender list who are murderer rapists then ? I knew the tide was turning when I learned of this. We have to turn it back with all the IT tools at our disposal. The Western governments in this have fundamentally lost their credibility now among anyone who groks.</p>
<p>Amazon and paypal have joined the losing side, and I will try and dig out some figures about how many customers, and ultimately bucks (hey who cares about the people anyway, right Amazon?) that these nigh-monopolies have lost. Facebook is getting more than 100 people a minute supporting wikileaks in their page, and twitter seems to be getting about 200 #wikileaks tweets a minute. I will also try and graph some of this in a later post.</p>
<p>It&#8217;s like the prisoners dilemma, if only 10 people on the planet get busted for supporting them then those poor brave souls will be heavily punished. But if millions join in a domino tipple of small scale acts of single-click bravery they can do nothing. I just hope the complacent ones busily watching talent shows, reality tv or the weather will appreciate the changes that these brave people they think are so weird are facilitating. Trust in the power of the mass, and allow goodwill to trump the fear. We must all become involved. Monolithic organisations can be out-thought by small and dynamic ones who leverage crowdsourcing. And &#8220;Net-Guerilla&#8221; tactics have their place too, with no weapon needed except a smartphone. Lets crowdsource a new kind of world !</p>
<p>In the words of Jim Morrisson &#8220;They got the guns but we&#8217;ve got the numbers&#8221;. I&#8217;d like to see some DDOS attacks on anti wikileaks organisations. I thought of one on interpol, but then (please note) I decided that I must not do anything illegal. Now of course would I do that ? No, although I do admit it might be on my to-do list once there are so many people refusing the kool-aid that we can outvote the politicians, authoritarians and thuggish bully boys who make these laws.</p>
<p>Singularity means accelerated change. That applies to all sectors and groups, hey, the internet has already revolutionised the sale of patchwork quilts, custom mouse mats, personalised birthday cakes and a million kinds of trivia. Now get ready for some other kinds of more profound change ! It seems so simple to me that in a democracy the people must know. And those people are mostly nice ones who don&#8217;t want war, murder and torture. Pervasive computation is spreading like lichen on a rock into all sorts of corners, and the leaks are a direct byproduct of the planet wide connectivity that will be leading us toward singularity.</p>
<p>If you don&#8217;t feel up to mirroring wikileaks on one of your servers, then at least download the torrent of the &#8216;insurance policy&#8217; which is available at https://thepiratebay.org/torrent/5723136/WikiLeaks_insurance and seed it. Windows users google utorrent, linux look for transmission.</p>
<p>If you are a military man then bet on the winners, share everything you&#8217;ve got, if a policeman do the same. At first the brave souls will do it, then later there&#8217;ll be so many of you that you can&#8217;t be nicked. You don&#8217;t have to be high-up for it to matter because we can handle the data growing hugely, that&#8217;s what all us boffins do with our time anyway. Techno democracy will keep debugging the proprietary code of deprecated and legacy political systems until open source government starts to get trendy. Early adopters will move to transient city states at first, then the mainstream will have to listen, and more effective, fair and ethically acceptable political code will get written. It will belong to everyone like the US Constitution did in Asimov&#8217;s &#8220;The Stars Like Dust.&#8221;</p>
<p><strong>Open Sourcing What You Know about our Governments Is A Gift To Humanity and Posterity<br />
</strong><br />
Hell even Thanet Council, where I live in the quiet south east of merry England probably has a few nasty coffins in their cupboards. Let&#8217;s go for it and smooth out all of the crinkles in our planetary political system so we can get on with the real fun of becoming a type 1 civilisation that doesn&#8217;t destroy its home planet, and gets past these last few extinction-level dangers that this historical period offers us.</p>
<p>The Facebook group will be at 1,000,000 supporters by tomorrow or the next day. There are 600,000,000 people on that whole site with a common culture that already makes them a little like a large country, call it &#8220;Facebookia&#8221; if you like. If some truly representative and politically inclined movement emerged out of facebook then why shouldn&#8217;t their citizens decide their own rules and policies. This is a whisper of the political change that must be on the cards if the Singularity really is near. What if wikileaks got 10,000,000 supporters ? maybe we should demand our own Zion somewhere in the world and start afresh there, a bit of land and place to call home. I&#8217;d be up for it personally, I&#8217;m sick of feeling like a prole straight out of Orwell&#8217;s 1984 in my own country, thank you.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pythonism.wordpress.com/845/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pythonism.wordpress.com/845/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pythonism.wordpress.com/845/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pythonism.wordpress.com/845/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pythonism.wordpress.com/845/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pythonism.wordpress.com/845/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pythonism.wordpress.com/845/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pythonism.wordpress.com/845/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pythonism.wordpress.com/845/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pythonism.wordpress.com/845/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pythonism.wordpress.com/845/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pythonism.wordpress.com/845/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pythonism.wordpress.com/845/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pythonism.wordpress.com/845/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pythonism.wordpress.com&amp;blog=3580594&amp;post=845&amp;subd=pythonism&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pythonism.wordpress.com/2010/12/05/why-wikileaks-is-one-symptom-of-an-approaching-singularity/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a5395c548819c89c914016d32e44394a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pythonisms</media:title>
		</media:content>

		<media:content url="http://english.ruvr.ru/data/2010/10/26/1210345812/240px-Wikileaks_logo_svg%20copy.jpg" medium="image" />
	</item>
		<item>
		<title>What is your heresy ? Here&#8217;s mine&#8230;</title>
		<link>http://pythonism.wordpress.com/2010/11/24/what-is-your-heresy-heres-mine/</link>
		<comments>http://pythonism.wordpress.com/2010/11/24/what-is-your-heresy-heres-mine/#comments</comments>
		<pubDate>Wed, 24 Nov 2010 21:45:12 +0000</pubDate>
		<dc:creator>Trip Technician</dc:creator>
				<category><![CDATA[Creative Writing]]></category>

		<guid isPermaLink="false">http://pythonism.wordpress.com/?p=829</guid>
		<description><![CDATA[This piece is partly in honour of the AI scientist Ben Goertzel who seems from his writings to have an active spiritual sense, and to at least credit the existence of what he calls &#8216;psi&#8217;. (He also has a very cool &#8216;stoner-geek&#8217; manner when he talks which has prompted various witty comments&#8230;) I am in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pythonism.wordpress.com&amp;blog=3580594&amp;post=829&amp;subd=pythonism&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This piece is partly in honour of the AI scientist Ben Goertzel who seems from his writings to have an active spiritual sense, and to at least credit the existence of what he calls &#8216;psi&#8217;. (He also has a very cool &#8216;stoner-geek&#8217; manner when he talks which has prompted various witty comments&#8230;) I am in doubt about many things but reading and sensing Ben&#8217;s lofty grasp of math and code, I wavered in the old, and not unknown to me, direction of believing in a spiritual reality un-knowably beyond science once more. Yeah sure I should make my own decisions and thus should be able to work this out for myself, but no man is an island, and that&#8217;s why I am writing this for others (and thereby considering it more carefully for myself).</p>
<p>I came across a quote by Darwin the other day in a quotation book where he spoke of facts that didn&#8217;t fit with his ontology of causes in nature as being the ones that escaped his memory most easily.</p>
<blockquote><p>I had,&#8230; during many years, followed a golden rule, namely, that whenever a published fact, a new observation or thought came across me, which was opposed by my general results, to make a memorandum of it without fail and at once; for I had found by experience that such facts and thoughts were far more apt to escape from memory than favourable ones&#8221;</p></blockquote>
<p>This gave rise to a strange association, since it made me remember various experiences I have had in my life which could loosely be called paranormal. This post is just a rap about the thoughts that quote gave me. I found had done exactly what Darwin did and conveniently ruled these inexplicable experiences out of my mind, perhaps through believing I was in the grip of madness. One time I played with a Ouija board with some other students at university and the glass emitted a loud popping sound and jumped into the air. Another time I saw a Buddhist monk standing in the street in Camden Town and suddenly seemed to perceive that his mind was linked to a beautiful rippling pool of energy from some kind of higher sphere that he had somehow channelled down into himself.</p>
<p>Aged 19, at the Sri Rangam Temple in Trichy, India, I sensed a powerful &#8216;field&#8217; of energy. Also another time in my mid twenties I entered Canterbury Cathedral  and experienced a similar kind of rippling energy in the air inside the building. I would think twice before mentioning these experiences in the company of hard scientists because I find it a slightly unpleasant feeling to be thought a little mad !</p>
<p><span id="more-829"></span></p>
<p>I now feel it is as much a wrong turning to become a &#8220;scientific materialism fundamentalist&#8221;, as to be any other kind of fundamentalist. We just end up full of hot air when we reach too far into unsupportable  and over-bold assertions about the nature of the whole universe based on our tiny and highly provincial habitation of a very small corner of it. These thoughts mingled in my mind with those from another book: &#8220;Impossibility&#8221; by John D Barrow. They formed a kind of Lovecraftian vision of a strange and ominous universe full of insoluble mysteries. Barrow points out that the insoluble problems of reality outnumber the soluble ones and presumably implies that any general intelligence with less that infinite IQ would find this. Some problems are algorithmically intractable, some cannot even be framed or represented. I don&#8217;t even know whether the quantifier &#8216;some&#8217; can describe an infinite set in that last sentence either ! Is mathematics infinite or will we one day come to its end ? I doubt it, after all it embodies concepts of that very infinity within its own esoteric scribbles.</p>
<p>The sceptical elimination of some paranormal phenomena will clearly work for a lot of cases but I think scientists can become arrogant about eliminating all mysteries when we are indeed sitting on top of, or thinking with, one of the truly great unsolved mysteries -that of the grey matter that is itself reading what I have written here. And one catches a sense that any explanation that was ever offered for consciousness just couldn&#8217;t quite sum it up. It was the physicist David Bohm who suggested that the brain, in neural microtubules, might somehow leverage quantum mechanical effects in the generation of consciousness. Recently other voices have joined in, with some thoughts now at large that photosynthesis also leverages quantum phenomena. I feel I am sinning somehow if I allow a crude blanket statement that no anomalous phenomena exist in space-time, the great assumption of all science is that the sun will rise tomorrow -i.e. that processes are regular. But this regularity is an axiom which we take on a kind of faith.</p>
<p>Weirdness may well exist out there, and it might be staring back at us too! What is the personified universe saying to me ? I seem to have to reach beyond my own collection of habitual thoughts bequeathed by the past into a space that is utterly present tense, and inherently unique. I am the anomaly.</p>
<p>After musing for a while again I now have a further statement I wish to make about this:</p>
<p><strong>it is actually evil to fake scientific results</strong></p>
<p>You are emitting a highly condensed and dangerous kind of lie if you do this. Scientists have to have a bold, confident and can-do attitude, and believe in their power to solve problems. It is a psychological error, though, to overstate this and be too sure about things, like some young quantitative Mohammed Ali. The faith that the universe never contains anomalies, and that our limited conceptual architecture has seen right to the limits of possibility in this, is indeed a kind of fundamentalism. It is like someone who has just embarked on the excitement and thrill of reading and thinking, but who resolutely stays with all the conclusions of the very first few books they ever read.</p>
<p>I find some kind of idea that the universe has a mirror aspect &#8211; it reflects back our own prejudices onto us, and we assume that is all there is. Maybe the eastern philosophical traditions view this kind of idea as less heretical. I&#8217;d love to keep researching all this, and will keep a background module running on it in my small way, but I am a code addict too and will probably shelve the largest questions again in favour of that intricate, almost predestined dance of logic which does answer so many questions for me.</p>
<p>Darwin also said that adaptability is more powerful than intelligence. If we can&#8217;t adapt to our own perceptions we are not truly scientific. Yes we must also question them, and knock them down if we can, but I haven&#8217;t been able to knock down those experiences. Denying facts and forming models that rule out psi because it&#8217;s a  mystery is this kind of &#8216;cooking the books&#8217; which I allege above is a such a  great crime. When I had these inexplicable magical experiences I ran off and developed a load of ill-formed ideas about them, became confused and then assumed I was crazy, but it is only now with a little more maturity that I feel I can absorb them properly. Not that absorbing is comprehending, mind you.</p>
<p>Some of you will think I am mad for this, but I have another benefit, which is to have common ground with most of the non-scientist human race who aren&#8217;t quite as sure as that minority of material fundamentalists. I have more I can talk about with people from other traditions, which feels great. There is a spiritual fellowship available as well as a scientific one. I don&#8217;t need to face those arrogant and lonely arguments defending sceptical materialism I used to have as an undergraduate.</p>
<p>It is also an axiom of science that, to count, experiments must be reproducible. How could you ever demonstrate that this regularity is a sound assumption ? A naive view takes the assumption of regularity and then extends it too far. But without it we can&#8217;t even start, except to say <em>&#8220;there are sensations&#8221; </em>and leave it at that. The singularity that we find at the beginning of the universe may have been a unique event, and maybe there are indeed other such events which defy the models we usually build. And maybe that&#8217;s all we can ever find out about them, except when magical intuition grants us brief glimpses.</p>
<p>After all the only thing I truly know is that I know nothing, and frankly I&#8217;m not even sure of that !</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pythonism.wordpress.com/829/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pythonism.wordpress.com/829/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pythonism.wordpress.com/829/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pythonism.wordpress.com/829/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pythonism.wordpress.com/829/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pythonism.wordpress.com/829/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pythonism.wordpress.com/829/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pythonism.wordpress.com/829/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pythonism.wordpress.com/829/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pythonism.wordpress.com/829/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pythonism.wordpress.com/829/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pythonism.wordpress.com/829/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pythonism.wordpress.com/829/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pythonism.wordpress.com/829/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pythonism.wordpress.com&amp;blog=3580594&amp;post=829&amp;subd=pythonism&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pythonism.wordpress.com/2010/11/24/what-is-your-heresy-heres-mine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a5395c548819c89c914016d32e44394a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pythonisms</media:title>
		</media:content>
	</item>
	</channel>
</rss>
