Elliot Temple | Permalink | Messages (0)

Syntax Highlighting

I've used Enscript to syntax highlight ruby code in html, but it's not very good and causes html validation errors. So I found a better approach. I added some CSS and here's the ruby code:

#!/usr/bin/env ruby 

require 'rubygems'
require 'syntax/convertors/html'
require 'rio'

use_stdin = ARGV.empty?

if use_stdin
code = $stdin.read
else
code = File.read(ARGV[0])
end

convertor = Syntax::Convertors::HTML.for_syntax "ruby"
code_html = "<code class='ruby'> #{convertor.convert(code)} </code>"

if use_stdin
puts code_html
else
fn = "#{File.basename(ARGV[0], File.extname(ARGV[0]))}.html"
rio(fn) << code_html
end

Elliot Temple | Permalink | Messages (0)

The Prince and Me

The Prince and Me is a typical, modern relationship movie. That means shallow characters who don't think about each other (the little that there is), who fall in love for no reason, cement their relationship with sexual touching, dramatically breakup once or twice, and then live happily ever after.

Here are the interests of the characters:

Paige: medicine, getting into medical school

Eddie: cars, girls

What do they do together? First, he annoys her and gets rejected. She appears beautiful and challenging. Then, she starts liking him but denies it for some reason, after a bit of persistence and doing some schoolwork together. They meet her family. They work at the same restaurant and she teaches him to slice meet. She also teaches him to do laundry. That's about it. Throw in flirting and you have the basis of their relationship.

Of course, once they kiss, everything changes. Now they touch all the time and smile a lot, and this distracts them from doing anything else. However, this is too boring to last long in a movie, even though it's supposed to be the good part (and shouldn't the good part of a relationship be interesting?). So they quickly get caught making out by the media, and then she finds out he's a prince and never told her. And then she dumps him for "lying" to her (by omission). How quickly "happily ever after" isn't!

As usual, she soon realizes her mistake and regrets it. If only she'd ever seen a movie like this one, she'd have realized it's better to think first and breakup second. So she goes back to him.

Then he's going to be King soon, so proposes marriage. She agrees without asking any questions. Isn't that strange? Why does becoming King mean he needs a wife immediately? Is it really a good idea to get engaged a couple days after a breakup? And what responsibilities does a queen have? And where will they live? And what will happen to her life and future plans? Will she still go to medical school? At the school she intended, or one in Denmark?

But considering stuff like that is a matter of reason. This is a movie about love. So she just agrees and finds out what it means later. She has a very busy schedule, most of which seems boring. Worse, he's busier and has to leave her in the middle of activities (which means sexual touching getting interrupted, because that's all they really do). This leaves her waiting around, alone.

So she dumps him again to back to the USA and go to medical school. She doesn't want to give up her career. It never occurs to her to try to get both things she wants. She just picks one and painfully gives up the other.

If he cared about her at all, he would have seen this problem coming in advance. I sure did, and I'm just an audience member. He could have been figuring stuff out like whether there is a medical school in Denmark she could go to (of course there is). She could have thought of this too it's not that hard.

So after she dumps him and leaves, he follows her and says "I'll wait." She can go to medical school, and whatever else she wants, and they'll be together afterwards. They still don't seem to realize she could go to school in his country and they don't have to be far apart. Regardless, she agrees, and the movie closes without further discussion: they will live happily ever after. The last two times that appeared to be true, and then she dumped him, were just bad luck, but there is no possible way they'll be unlucky again. Why not? Because they are in love. Being in love prevents bad luck, except when it doesn't. Umm. Yeah I give up, they are just dumb. Relationships should contains mechanisms to stabilize them against bad luck, and ameliorate the effects of bad luck. And not just bad luck (it wasn't actually a matter of luck), but problems of all sorts, whatever their cause. What sort of mechanism would work well? For a start, they should think about how they can get the things they want and solve problems, instead of resorting immediately to breaking up. And they should get to know each other over time and avoid any commitments or obligations which don't have specific and valuable function instead of just jumping into things and having faith that love will see them through.

Everyone knows that communication is the key to a good relationship. Or so they say. Yet movies like this are the norm, and movies featuring good communication are nonexistent. Romance novels, which have plenty of space for dialog, also feature poor communication. The truth is, reasoned discussion isn't sexy. Love doesn't like being talked about, and people enjoy it more when they aren't talking, they are just touching and smiling.

The best part of the movie was when they first approach the royal palace together:
Paige: Oh no.
Eddie: What?
Paige: You didn't tell me you lived with your parents.

Elliot Temple | Permalink | Messages (0)

Godwin's Reputation

In 1825, Hazlitt described some of the fluctuations which the reputation of William Godwin had already experienced: "˜during his lifetime,"™ he had "˜secured to himself the triumphs and the mortifications of an extreme notoriety and of a sort of posthumous fame."™ Godwin"™s inspirational role to younger writers and radicals, combined with the vilification of many, after the emergence of An Enquiry Concerning Political Justice in 1793, had placed him in the peculiar category of being regarded in the past tense, even whilst he carried on the seemingly endless production of writings of all sorts that would continue to appear until his death in 1836. "˜He is thought of now"™, says Hazlitt, "˜like any eminent writer of a hundred-and-fifty years ago, or just as he will be a hundred-and-fifty years hence."™ It would seem unlikely that Godwin has maintained the level of eminence that Hazlitt accords him

Source

He was ignored during his own life as if he was long dead. And then when long dead, ignored more than that. Sigh.

Elliot Temple | Permalink | Messages (0)

Quotes from Political Justice, Books 1-4

These quotes are by William Godwin in Political Justice (1793) which I gathered while reading.

Book 1:

ch4

I shall attempt to prove two things: first, that the actions and dispositions of mankind are the offspring of circumstances and events, and not of any original determination that they bring into the world; and, secondly, that the great stream of our voluntary actions essentially depends, not upon the direct and immediate impulses of sense, but upon the decisions of the understanding.

ch5

let us suppose a man to be engaged in the progressive voluptuousness of the most sensual scene. Here, if ever, we may expect sensation to be triumphant. Passion is in this case in its full career. He impatiently shuts out every consideration that may disturb his enjoyment; moral views and dissuasives can no longer obtrude themselves into his mind; he resigns himself, without power of resistance, to his predominant idea. Alas, in this situation, nothing is so easy as to extinguish his sensuality! Tell him at this moment that his father is dead, that he has lost or gained a considerable sum of money, or even that his favourite horse is stolen from the meadow, and his whole passion shall be instantly annihilated: so vast is the power which a mere proposition possesses over the mind of man. So conscious are we of the precariousness of the fascination of the senses that upon such occasions we provide against the slightest interruption. If our little finger ached, we might probably immediately bid adieu to the empire of this supposed almighty power. It is said to be an experiment successfully made by sailors and persons in that class of society, to lay a wager with their comrades that the sexual intercourse shall not take place between them and their bedfellow the ensuing night, and to trust to their veracity for a confession of the event. The only means probably by which any man ever succeeds in indulging the pleasures of sense, in contradiction to the habitual persuasion of his judgement, is by contriving to forget everything that can be offered against them. If, notwithstanding all his endeavours, the unwished for idea intrudes, the indulgence instantly becomes impossible. Is it to be supposed that the power of sensual allurement, which must be carefully kept alive, and which the slightest accident overthrows, can be invincible only to the artillery of reason, and that the most irresistible considerations of justice, interest and happiness will never be able habitually to control it?

ch5

We find the thinking principle within us to be uniform and simple; in consequence of which we are entitled to conclude, that it is in every respect the proper subject of education and persuasion, and is susceptible of unlimited improvement. There is no conduct, in itself reasonable, which the refutation of error, and dissipating of uncertainty, will not make appear to be such. There is no conduct which can be shown to be reasonable, the reasons of which may not sooner or later be made impressive, irresistible and matter of habitual recollection. Lastly, there is no conduct, the reasons of which are thus conclusive and thus communicated, which will not infallibly and uniformly be adopted by the man to whom they are communicated.

ch5

By perfectible, it is not meant that he is capable of being brought to perfection. But the word seems sufficiently adapted to express the faculty of being continually made better and receiving perpetual improvement; and in this sense it is here to be understood. The term perfectible, thus explained, not only does not imply the capacity of being brought to perfection, but stands in express opposition to it. If we could arrive at perfection, there would be an end to our improvement. There is however one thing of great importance that it does imply: every perfection or excellence that human beings are competent to conceive, human beings, unless in cases that are palpably and unequivocally excluded by the structure of their frame, are competent to attain.

Book 2:

appendix 1 after ch2

remember that martyrs are suicides by the very signification of the term. They die for a testimony. But that would be impossible if their death were not to a certain degree a voluntary action. We must assume that it was possible for them to avoid this fate, before we can draw any conclusion from it in favour of the cause they espoused. They were determined to die, rather than reflect dishonour on that cause.

ch5

Few things have contributed more to undermine the energy and virtue of the human species, than the supposition that we have a right, as it has been phrased, to do what we will with our own. It is thus that the miser, who accumulates to no end that which diffused would have conduced to the welfare of thousands, that the luxurious man, who wallows in indulgence and sees numerous families around him pining in beggary, never fail to tell us of their rights, and to silence animadversion and quiet the censure of their own minds, by observing "that they came fairly into possession of their wealth, that they owe no debts, and that of consequence no man has authority to enquire into their private manner of disposing of that which appertains to them." We have in reality nothing that is strictly speaking our own. We have nothing that has not a destination prescribed to it by the immutable voice of reason and justice; and respecting which, if we supersede that destination, we do not entail upon our selves a certain portion of guilt.

ch5

Every man has a certain sphere of discretion, which he has a right to expect shall not be infringed by his neighbours. This right flows from the very nature of man. First, all men are fallible: no man can be justified in setting up his judgement as a standard for others. We have no infallible judge of controversies; each man in his own apprehension is right in his decisions; and we can find no satisfactory mode of adjusting their jarring pretensions. If everyone be desirous of imposing his sense upon others, it will at last come to be a controversy, not of reason, but of force. Secondly, even if we had an in fallible criterion, nothing would be gained, unless it were by all men recognized as such. If I were secured against the possibility of mistake, mischief and not good would accrue, from imposing my infallible truths upon my neighbour, and requiring his submission independently of any conviction I could produce in his understanding. Man is a being who can never be an object of just approbation, any further than he is independent. He must consult his own reason, draw his own conclusions and conscientiously conform himself to his ideas of propriety. Without this, he will be neither active, nor considerate, nor resolute, nor generous.
For these two reasons it is necessary that every man should stand by himself, and rest upon his own understanding. For that purpose each must have his sphere of discretion. No man must encroach upon my province, nor I upon his. He may advise me, moderately and with out pertinaciousness, but he must not expect to dictate to me. He may censure me freely and without reserve; but he should remember that I am to act by my deliberation and not his. He may exercise a republican boldness in judging, but he must not be peremptory and imperious in prescribing. Force may never be resorted to but, in the most extraordinary and imperious emergency. I ought to exercise my talents for the benefit of others; but that exercise must be the fruit of my own conviction; no man must attempt to press me into the service. I ought to appropriate such part of the fruits of the earth as by an accident comes into my possession, and is not necessary to my benefit, to the use of others; but they must obtain it from me by argument and expostulation, not by violence. It is in this principle that what is commonly called the right of property is founded. Whatever then comes into my possession, without violence to any other man, or to the institutions of society, is my property. This property, it appears by the principles already laid down, I have no right to dispose of at my caprice; every shilling of it is appropriated by the laws of morality; but no man can be justified, in ordinary cases at least, in forcibly extorting it from me. When the laws of morality shall be clearly understood, their excellence universally apprehended, and themselves seen to be coincident with each man's private advantage, the idea of property in this sense will remain, but no man will have the least desire, for purposes of ostentation or luxury, to possess more than his neighbours.

ch6

do you wish by the weight of your blows to make up for the deficiency of your logic? This can never be defended. An appeal to force must appear to both parties, in proportion to the soundness of their understanding, to be a confession of imbecility. He that has recourse to it would have no occasion for this expedient if he were sufficiently acquainted with the powers of that truth it is his office to communicate. If there be any man who, in suffering punishment, is not conscious of injury, he must have had his mind previously debased by slavery, and his sense of moral right and wrong blunted by a series of oppressions.

ch6

If there be any truth more unquestionable than the rest, it is that every man is bound to the exertion of his faculties in the discovery of right, and to the carrying into effect all the right with which he is acquainted. It may be granted that an infallible standard, if it could be discovered, would be considerably beneficial. But this infallible standard itself would be of little use in human affairs, unless it had the property of reasoning as well as deciding, of enlightening the mind as well as constraining the body.

Book 4:

ch2

The only method according to which social improvements can be carried on, with sufficient prospect of an auspicious event, is when the improvement of our institutions advances in a just proportion to the illumination of the public understanding.

ch2

Under this view of the subject then it appears that revolutions, instead of being truly beneficial to mankind, answer no other purpose than that of marring the salutary and uninterrupted progress which might be expected to attend upon political truth and social improvement. They disturb the harmony of intellectual nature. They propose to give us something for which we are not prepared, and which we cannot effectually use. They suspend the wholesome advancement of science, and confound the process of nature and reason.

ch3

Party has a more powerful tendency than perhaps any other circumstance in human affairs to render the mind quiescent and stationary. Instead of making each man an individual, which the interest of the whole requires, it resolves all understandings into one common mass, and subtracts from each the varieties that could alone distinguish him from a brute machine. Having learned the creed of our party, we have no longer any employment for those faculties which might lead us to detect its errors. We have arrived, in our own opinion, at the last page of the volume of truth; and all that remains is by some means to effect the adoption of our sentiments as the standard of right to the whole race of mankind.

ch3

There is at present in the world a cold reserve that keeps man at a distance from man. There is an art in the practice of which individuals communicate for ever, without anyone telling his neighbour what estimate he forms of his attainments and character, how they ought to be employed, and how to be improved. There is a sort of domestic tactics, the object of which is to elude curiosity, and keep up the tenour of conversation, without the disclosure either of our feelings or opinions. The friend of justice will have no object more deeply at heart than the annihilation of this duplicity. The man whose heart overflows with kindness for his species will habituate himself to consider, in each successive occasion of social intercourse, how that occasion may be most beneficently improved. Among the topics to which he will be anxious to awaken attention, politics will occupy a principal share.

ch4

either the nation whose tyrant you would destroy is ripe for the assertion and maintenance of its liberty, or it is not. If it be, the tyrant ought to be deposed with every appearance of publicity. Nothing can be more improper than for an affair, interesting to the general weal, to be conducted as if it were an act of darkness and shame. It is an ill lesson we read to mankind, when a proceeding, built upon the broad basis of general justice, is permitted to shrink from public scrutiny. The pistol and the dagger may as easily be made the auxiliaries of vice, as of virtue. To proscribe all violence, and neglect no means of information and impartiality, is the most effectual security we can have, for an issue conformable to reason and truth.

ch5

the adherents of the old systems of government [aristocracy] affirm "that the imbecility of the human mind is such as to make it unadviseable that man should be trusted with himself; that his genuine condition is that of perpetual pupillage that he is regulated by passions and partial views, and cannot be governed by pure reason and truth; that it is the business of a wise man not to subvert, either in himself or others, delusions which are useful, and prejudices which are salutary; and that he is the worst enemy of his species who attempts, in whatever mode, to introduce a form of society where no advantage is taken to restrain us from vices by illusion, from which we cannot be restrained by reason."

ch5

Nor is there any reason to believe that sound conviction will be less permanent in its influence than sophistry and error.

ch5 appendix

Philanthropy, as contradistinguished to justice, is rather an unreflecting feeling than a rational principle. It leads to an absurd indulgence, which is frequently more injurious than beneficial, even to the individual it proposes to favour.

ch6

Men are now feeble in their temper because they are not accustomed to hear the truth. They build their confidence in being personally treated with artificial delicacy, and expect us to abstain from repeating what we know to their disadvantage. But is this right? It has already appeared that plain dealing, truth, spoken with kindness, but spoken with sincerity, is the most wholesome of all disciplines.

ch6

sincerity is, in an eminent degree, calculated to conduce to our intellectual improvement. If from timidity of disposition, or the danger that attends a disclosure, we suppress the reflections that occur to us, we shall neither add to, nor correct them. ... If [my thoughts] be received cordially by others, they derive from that circumstance a peculiar firmness and consistency. If they be received with opposition and distrust, I am induced to revise them. I detect their errors; or I strengthen my arguments, and add new truths to those which I had previously accumulated. ... It is in the nature of things impossible that the man who has determined never to utter the truths he may be acquainted with should be an intrepid and indefatigable thinker. The link which binds together the inward and the outward man is indissoluble; and he that is not bold in speech will never be ardent and unprejudiced in enquiry.

ch6 appendix 1

Nor is it a valid objection to say "that, by such a rule, we are making every man a judge in his own case." In the courts of morality it cannot be otherwise; a pure and just system of thinking admits not of the existence of any infallible judge to whom we can appeal. It might indeed be further objected "that, by this rule, men will be called upon to judge in the moment of passion and partiality, instead of being referred to the past decisions of their cooler reason." But this also is an inconvenience inseparable from human affairs. We must and ought to keep our selves open, to the last moment, to the influence of such considerations as may appear worthy to influence us. To teach men that they must not trust their own understandings is not the best scheme for rendering them virtuous and consistent. On the contrary, to inure them to consult their understanding is the way to render it worthy of becoming their director and guide.

ch10

Neither philosophy, nor morality, nor politics will ever show like itself till man shall be acknowledged for what he really is, a being capable of rectitude, virtue and benevolence, and who needs not always be led to actions of general utility, by foreign and frivolous considerations.

ch11

there is a degree of improvement real and visible in the world. This is particularly manifest, in the history of the civilised part of mankind, during the three last centuries. The taking of Constantinople by the Turks (1453) dispersed among European nations, the small fragment of learning, which was, at that time, shut up within the walls of this metropolis. The discovery of printing was nearly contemporary with that event. These two circumstances greatly favoured the reformation of religion, which gave an irrecoverable shock to the empire of superstition and implicit obedience. From that time, the most superficial observation can trace the improvements of art and science, which may, without glaring impropriety, be styled incessant. Not to mention essential improvements which were wholly unknown to the ancients, the most important characteristics of modern literature, are the extent of surface over which it is diffused, and the number of persons that participate in it. It has struck its roots deep, and there is no probability that it will ever be subverted. It was once the practice of moralists, to extol past times, and declaim without bound on the degeneracy of mankind. But this fashion is nearly exploded. The true state of the fact is too gross to be mistaken. And, as improvements have long continued to be incessant, so there is no chance but they will go on. The most penetrating philosophy cannot prescribe limits to them, nor the most ardent imagination adequately fill up the prospect.

Elliot Temple | Permalink | Messages (0)

How To Be Ignored By History

Tell The Truth
Mary Shelley's mother was Mary Wollstonecraft Godwin. This name is fairly unknown too in modern times outside small circles of the enlightened. Mary Wollstonecraft was the first feminist. And whether you agree with feminism or not it is hard not to agree with Mary's idea. In fact probably the only reason her name is not set in gold and adorned in every corner of the world is that William Godwin wrote a posthumous biography of her that was considered way too honest, and it is, even by today's standards.

Elliot Temple | Permalink | Messages (0)

Divorce After Ten Years?

http://zgrossbart.blogspot.com/2007/11/library-problem.html
My wife and I have several hundred books on our shelves, and I'm preparing to fully integrate them (heck, we've been married ten years...I think it's safe to say if she hasn't gotten sick of me yet she's not likely to!) this month.
Consider the comment about divorce. I think it is false. What proportion of divorces come after 10 years or more? Well, it can't be too low: Googling turns up the median length of first marriages that end in divorce is 7.85 years. A 'median' means that half are more and half less. So ten years of marriage doesn't make you "safe" from divorce at all.

Worse, suppose she was getting sick of him. Would she tell him? Probably not. If she did, it could poison their relationship, make things worse, or even cause a divorce. She could ruin the option of staying by admitting she was considering leaving.

That is one of the ways which marriages suppress open discussion and problem solving. Of course, things don't have to be that way. But the fact is they are. A marriage has to be unrecognizably unusual for that to change.

Elliot Temple | Permalink | Messages (0)

Torture and Rationality

Some people say we should not torture terrorists because it doesn't produce reliable information. They say that the person being tortured can just lie, or not answer: nothing about torture actually causes them to truthfully reveal information.

What they are really saying is this: people can act rationally while being tortured.

That's possible. But consider that people rarely act rationally when not being tortured. And torture is adapted to make it harder to think clearly and rationally.

I don't know how reliable torture is, but it definitely does do something to cause truthful answers. It's adapted to impair rational thinking in humans. (This doesn't mean it was consciously designed this way, it could simply have evolved by people using whichever methods turned out the best results.)

It's easy to think, "There is no rational reason torture would work." But that is a mistake. Torture isn't about rational reasons. It's about hurting people very, very badly in order to coerce them and prevent reason from playing any role in the proceedings. Torture isn't about having a discussion.

Elliot Temple | Permalink | Messages (0)