Archive

Archive for January, 2009

Script-Fu Template For Batch Processing In GIMP

January 31, 2009 edwinhere 4 comments

Time and again, I’ve wanted to do a set of operations on a large set of images. I knew that Script-Fu in GIMP could do the job, but I could never find a boiler plate code to act on all files in a directory.

This is a little something I wrote to reduce the number of colors and remove the alpha channel of a large number of PNG files in a directory:

(define (smallify dir)
  (let*
    ((files-list (car (cdr (file-glob dir 0))))
     (do-one (lambda (f) (let*
                           ((i (gimp-file-load RUN-NONINTERACTIVE f f))
                            (d (gimp-image-flatten (car i))))
                           (begin
                             (gimp-posterize (car d) 5)
                             (file-png-save2 RUN-NONINTERACTIVE (car i) (car d)
                              f f 0 9 0 0 0 0 0 0 0)
                             #t)))))
    (map do-one files-list)))

Here is the generic template that can be used for batch processing a lot of images in one directory:

(define (do-many dir)
  (let*
    ((files-list (car (cdr (file-glob dir 0))))
     (do-one (lambda (f) (your-code-goes-here))))
    (map do-one files-list)))

In order to use the above template, first replace (your-code-goes-here) with the s-expression you need to change the images. (Hint: Use Filters > Script-Fu > Console > Browse… to see the documentation). While doing so keep in mind that f will contain the full path to each file in your directory; you can use f to do what you wish that file.

Then in Script-Fu console, paste the resulting code in the text field there and press enter. This will define the do-many function. Then you can call it like this:

(do-many "/home/edwin/alotafimages/*.png")

And your s-expressions will act on all PNG files in that directory.

Categories: IT, computers & foss, hacking

Ted Haggard & The Christian attitude towards Human Sexuality

January 28, 2009 edwinhere Leave a comment

Researchers have looked into a variety of possible causes for a homosexual orientation, including biological influences, prenatal hormones, prenatal stress, fraternal birth order, and environmental influences.[26] The American Psychiatric Association has stated “some people believe that sexual orientation is innate and fixed; however, sexual orientation develops across a person’s lifetime.”[27] However, the American Psychological Association has stated “most people experience little or no sense of choice about their sexual orientation.”[28]
–From Wikipedia

In spite of everything evidence has to say about the nature of homosexuality, most religions consider it to be a choice that a person makes. And this stance against homosexuality persuaded Ted Haggard to keep his real sexual orientations a secret. To make matters worse, he was a hypocrite.

Fortunately, mother nature allows no hypocrisy when it  comes to sexuality. Everybody is a “sinner” if we assume the Christian definitions about sexual sins. There is no point pretending to be more holier than someone else. Yet Christianity has done a lot of mental harm in this dimension by inducing an unnecessary guilt and unecessary repentance from its followers.

Ever wondered why a lot of authoritarian systems in human society want to control an individual’s sexuality? I feel it is a form of mind control. A lot of cults & political authoritarian systems have used sexual deprivation to keep individuals under control.

Categories: faith

Thoughts about Conservative Morality

January 27, 2009 edwinhere 1 comment

Been reading Bhagavat Gita lately using a word by word English translation. Right now somewhere by the Chapter 8 out of 18 Chapters.

It is mostly hogwash, but I am using it to try to understand the utilitarian reasons behind the conservative pillars of morality. There is something about the human lust for purity and human lust to adhere to duty regardless of consequences, that makes those qualities important for the greater good of our species. But they marinate it with so much hogwash, everywhere, in all sources of conservative morality, it is so hard to grasp the real utilitarian reasons.

I don’t think anyone can make a shift from being a liberal to a conservative. I like to think we are all born as either of the two. But I’ve forced to live the earlier part of my life as a strict conservative, by controlling the pleasures of the senses like what Pauline epistles had to say. (Just wondering, Did Paul get it from Gita/Buddha?)

I must say that way of life, trained me to defer the need for reward and stick to duty. I am unable to do that as a liberal i.e. as Dr. Hyde. This must be the utilitarian reason for conservatism. Perhaps some of our ancestors realized the need to balance the two types of urges. Excessive indulgence in pleasures of the senses, lack of sense of duty, will hinder progress of our species, by making all of us incapable of performing that which is necessary & basic.

On the other hand, a lack of openness to experience & lack of empathy (i.e. the liberal moral principles) will make our species incapable of exploration, discovery, experimentation & testing of our beliefs.

These two conflicting ideologies seem to drive our moral decisions.

Video:

Categories: philosophy

Pro-Lifer’s Cognitive Dissonance

January 24, 2009 edwinhere Leave a comment

I believe there should be strict regulations on who can abort a fetus, when and for what reasons. Because, unregulated abortions can potentially affect a population’s sex ratio, genetic diversity etc. I am not making this up. Such things have really happened in certain parts of India where people chose to give birth to males instead of females, because males earn more. The end result was an entire generation without enough females.

However, I do not agree with the pro-life movement which hopes to equate abortions with murder. Here is why:

Although not conclusive, because the above survey was not scientific, it is fairly obvious that women wouldn’t want death penalty or life time sentence for illegal abortions. This might be because most women know what they are talking about and what might be the situations in which they might choose to act illegally.

There are many diseases for which abortion is the only way to save the life of a woman. Without it both the woman and the fetus would die. Personally, I’ve learnt one condition for which abortion is the only way out.

Contrary to the popular misconceptions about atheism, atheists consider life is better than death not because of certain religious pre-conceptions innate in their unconcious. Life is better than death because Lives can make Lives better. We choose to exist, and save lives because, some of those lives will end up improving the human condition.

The obvious question would be, why improve the human condition? The answer is easy, To be happy during the short 650,000 hours of existence we all get before becoming what we were before we existed.

Why be happy? Because we like happiness.

Categories: faith

Creationists are wrong about Information Theory too

January 18, 2009 edwinhere Leave a comment

OK I am not an expert on information theory, but I trust countless people who understand this post’s claims.

Link

Seems like information can be created unlike what some people claim.

Categories: faith

Christians can’t define morality

January 18, 2009 edwinhere Leave a comment

Christians often accuse atheists for not having a definition of morality.

But it is interesting how the same Christians can decide that eating shellfish, wearing mixed fabrics is moral despite what Bible has to say on the matter. They pick & choose what to follow and what not to follow based on their own inbuilt sense of morality.

They can’t define the morality within them that helps them decide what to pick and choose, but neither can anyone.

I think, the very existence of countless flavours of Christianity is proof enough that they disagree on what to pick and choose. Some think picketing at military funerals or bashing gays is moral, whereas other think it is immoral. Some think properity gospel is moral other think it is immoral.

Categories: faith

Inconsistencies in Christianity

January 18, 2009 edwinhere Leave a comment

A significant amount of Christian apologetic is based on the assumption that any system of beliefs that is consistent and complete, automatically exists in the reality, outside our minds. Theologians go to great lengths to tailor claims like divine simplicity without evidence, just to keep everything logical.

Do strings in String Theory exist in reality, outside our minds? Or instead, is space-time quantized in reality, outside our minds, according to the Loop quantum theory?

Remember that both String Theory & Loop quantum theory are consistent for all practical purposes, but it would be unwise to believe strings/quantized space-time is real just because the theories that propose those entities are consistent. Physicists settle these questions through experimentation, and not through speculation from an armchair.

The consistency of first-order arithmetic has been proved assuming that a certain ordinal called ε0 is wellfounded. Does this mean numbers exist in reality, outside of our minds? I don’t think so.

I’ve already described how Christianity does not correspond with reality, so I will be pointing out a few of the inconsistencies in Christianity. There is a lot more than this.

Inconsistencies in Christianity

  1. Shouldn’t something as functionally complex as God be infinitely more unlikely than an accidentally fine-tuned universe or accidental abiogenesis? I mean God is supposed to be all-knowing, almighty and reads 6 Billion minds. That is a lot of functionality! Wouldn’t
    something so functional as God need a intelligent designer according to Christian arguments?
  2. If something as functional as God did NOT need to be created, because it was outside of time, then, wouldn’t it infinitely more likely that it was in fact an functionally simple First Cause that did not need to be created either, because it was outside of time too?
  3. Does any religious scripture speak of divine simplicity? i.e. the unbelievable claim without evidence/analogy that something infinitely functional like God is infinitely simple and therefore could have happened by random chance. (Deut 6:4, Num 39 is not convincing).
  4. We are called to imitate Jesus. (John 8:12). You would stop me if someone/something were going to inject malaria into your children. Jesus does nothing to stop the mosquitoes that inject malaria into countless of children every year and a child dies from malaria every 30 seconds. Should we imitate Jesus? Considering that we know a tree (God) by its fruit (crime of inaction), (Matthew 7:16-20) doesn’t this mean, even if God exists (which is infinitely unlikely based on 1, 2 & 3) it is unworthy of worship because we are morally superior to it?
  5. Why didn’t almighty God sent an animal ahead of Jephthah’s daughter after the Spirit of the Lord came upon him and he promised to kill the first living thing that appears in front of him after the victory over Ammonites? (See Judges 11:29-39)
  6. How to apologists justify God killing all Egyptian first borns? How do apologists justify God drowning all unborn babies in the Great Flood?
  7. Why does an almighty being need apologists, defenders and advocates? Can’t he do it for himself?
  8. If God does not intervene with the fallen creation why do people pray for everything? If the Divine Plan has it that we will inevitably end up praying to God and has everything accounted for, why do religious people say we have freewill?
Categories: faith

The Voodoo Doll

January 18, 2009 edwinhere Leave a comment

I am secretly grateful to Israel, because they act as the focal point of Islamic aggression. Take them out of the picture and the haters will start finding new things to hate. Like, India for instance. Had it not been for Israel, the Islamic extremists would start knowing that the whole of the western & eastern civilization is made up of infidels, and they would start blowing themselves up in our lands.

I am also secretly grateful to our world police – USA, because no one else cares about freedoms of the people more than they do. Agreed, they show some fascistic tendencies because of the Christian right, but as long as the good people keep letting the world know we exist, everything should be fine.

I am scared of the day, when the balance may get lost.

Imagine a world in which the Christian/Islamic right  had total power. Science/History would be skewed according their preconceptions. Nobody would bother to check whether a belief corresponds with reality through experimentation as long as it is consistent & complete. And people who do find truth through experimentation will be silenced, like what the Young Earth Creationists do during their conferences.

Categories: Uncategorized

Human body worth more than $1,547,000

January 15, 2009 edwinhere Leave a comment

This one came up in the Metabolism & Regulation lectures.

  • 70 KG Male consumes 11,700kJ
  • Thermodynamic efficiency of pathways ~50%
  • 5,860kJ converted to ATP
  • Synthesis of 1 mole of ATP under cellular conditions requires ~50kJ
  • No of moles of ATP 5860/50 = 117
  • M wt of ATP (disodium salt) = 551g/mol (cost US$24 per g)
  • 117 moles = 64,467g of ATP (cost is > US$1,547,000)
  • Efficient recycling system of ATP/ADP; 50g of ATP in a 70kg adult.
  • Body must recycle 1300 times each day for each ATP molecule
Categories: Uncategorized

Debate Addicts

January 10, 2009 edwinhere 4 comments

While trying to de-convert apologists, I’ve met the debate addicts. These are people who never debate with themselves, but bury their doubts so deep within, that they are capable of maintaining an aura of super certainty, while hypocritically criticizing the agnosticism of atheists and defending an almighty who cannot defend for itself.

They are concerned about appearances than the truth. They like perpetual conflict. They hide behind jargon & long anecdotes, all in the name of protecting the normal believer from reality.

Back when I used to be a believer, I was told that these “warriors” were having easy victories over the attackers of the faith. We were asked not to worry or doubt because the warriors were taking care of it all. Meanwhile the warriors hid their “doubt wounds” for us normal believers to see and believe. “Liars and Deceivers for Jesus”, thats what I call these warriors now.

This might explain why there is a huge outrage when atheists try to reach out to the non-apologist with the gospel of doubt, like the recent Ads on buses.

Categories: faith