Skip to main content

Ralsina.Me — Roberto Alsina's website

A question for KDE devs...

... if I want to store a pass­word in kde­wal­let, from a non-kde ap­p, how can I do it?

It would be bet­ter if there was a client API I could link to that did­n't in­volve kdelib­s, or at least a DCOP in­ter­face.

This is nice tech­nol­o­gy, I want to use it.

A silly entry

To­day's en­try has no pieces of neat python code, no ques­tion­s, no crit­ic of any­thing, no in­ter­est­ing link, no hint of any­thing I wrote/(­would/will)write, no fun­ny piece, no un­fun­ny piece, no noth­ing.

I am tired to­day.

So, have a nice day :-)

The Da Vinci Code is Broken.

I saw The Da Vin­ci Code sat­ur­day night. This has spoil­er­s. So don't read it if that both­ers you, ok?

I can now post and noone can com­plain about how I had not read the book. Al­though of course, I haven't. But this is about the movie.

First, I want to say that I must cor­rect my pre­vi­ous com­ments, caused by read­ing a syn­op­sis of the book in Dan Brown's site.

I must say (as­sum­ing the movie fol­lows the book) that it does­n't paint Opus Dei as a clan­des­tine sect at all (not even as spe­cial­ly in­ter­est­ed in ob­tain­ing any se­cret). On­ly one spe­cif­ic cou­ple of Opus Dei guys are. Which is fine and dandy for me. Se­cret so­ci­etys can chase each oth­er around the globe. Their prob­lem.

Of course it al­so means the fol­low­ing ( again, if the book is like the movie ):

  • The com­­ments de­fend­ing the book's por­­trait of Opus Dei as a se­cret so­­ci­e­ty as ap­propi­ate fic­­tion are non­sense, be­­cause the book does­n't do that. You were de­fend­ing the book of some­thing that's not in the book.

  • The guy that wrote the syn­op­­sis in Dan Brown's of­­fi­­cial site has not read the book.

Hav­ing said that, on­to more se­ri­ous mat­ter­s...

Ron Howard is in­ca­pable of film­ing a com­pre­hen­si­ble ac­tion scene. Don't trust me? Watch the Smart­car chase.

Tom Han­k's hair is scary. It's a weird bi­lat­er­al com­bover. I used to do that. I don't any­more. I am right about stop­ping. Be­sides, it's way too dis­tract­ing.

//ralsina.me/static/calculin.jpg

Pro­fes­sor Lang­don, I pre­sume?

I en­joyed the movie as a pop­corn flick with pre­ten­tion­s, but most of the plot fol­lows no log­ic.

Sauniére trig­gers an alar­m, in the Lou­vre, and is then shot in the stom­ach. Then he traipses around the mu­se­um, finds a mark­er vis­i­ble on­ly on UV light, does things to three paint­ings, hides a key be­hind a large, heavy paint­ing, takes off his clothes, cre­ates an ana­gram, writes it on the floor along with some num­ber­s, draws a pen­ta­cle on his chest, ar­ranges him­self in a po­si­tion rem­i­nis­cent of the Vit­ru­bian man, and then dies.

He not on­ly does all that in­stead of call­ing an am­bu­lance on his cel­l, but he does all that be­fore mu­se­um se­cu­ri­ty gets there. In the gallery that has the Da Vin­cis.

Not on­ly is it un­like­ly, but it al­so is stupid. Had he died ear­lier, he could, for in­stance, have been found with the key in his hand, and no clue left for the "good guys".

It's amaz­ing there is still any paint­ings in that mu­se­um, with such se­cu­ri­ty.

And don't get me start­ed on the bi­i­i­i­ig se­cret. It turns out the Pri­o­ry of Sion pro­tects a se­cret about Je­sus.

If said se­cret was re­vealed, it would dam­age the catholic church.

Of course... the catholic church al­so knows the na­ture (and de­tail­s) of the se­cret, which means the catholic hi­er­ar­chs ded­i­cate their lifes to a faith they know to be false. Which makes no sense, re­al­ly.

And then it turns out that sev­er­al his­to­ri­ans al­so know the na­ture and de­tails of the se­cret, and have pub­lished books about it (ex­cep­t, of course, they have no ev­i­dence).

LAST WARN­ING, HUGE SPOIL­ER HERE

RE­AL­LY

There is, how­ev­er, one de­tail on­ly the Pri­o­ry is sup­posed to know: the lo­ca­tion of a corpse that could be used, via DNA anal­y­sis, to show that some per­son is a de­scen­dant of some spe­cif­ic oth­er "his­tor­i­cal fig­ure".

Which is, of course, ab­so­lute non­sense.

Sup­pose I show you a corpse and tell you "this is the corpse of Joan of Ar­c". You car­bon-14 date it, and do the usu­al foren­sic anal­y­sis, and all agrees. It's a wom­an, that died in a fire, at such age in so-and-­so year.

Then I show you a DNA anal­y­sis that shows she is my great-­great-­granny.

Am I the scion of the Or­leans Maid­en?

Hell no! Be­cause to ac­cept that, you would have to ac­cept that the corpse is her­s!

You can on­ly rea­son­ably do that if there is a clear his­tor­i­cal record of the where­abouts of the corpse un­til now, or else it's a rather sim­ple forgery.

For ex­am­ple, nowa­days we used DNA of known de­scen­dents of Colum­bus to de­cide which of his two al­leged bod­ies is the re­al one. About a known his­tor­i­cal fig­ure, world-­fa­mous in his life. We are just not sure of where his corpse is. We have two of those.

Since the "wit­ness­es" of the au­then­tic­i­ty of this corpse are the ones that are bound to gain from the claim­s, it's sus­pect at best.

If you go back a cer­tain num­ber of gen­er­a­tions, al­most ev­ery corpse will be your granny.

I am pret­ty sure that a large per­cent­age of mod­ern eu­ro­peans are re­lat­ed to al­most any ran­dom 2000 year-old corpse.

And, in the spe­cif­ic case of the movie (or the book), even if you as­sume it is the corpse of who they say, so what? That shows she is the de­scen­dant of a cer­tain wom­an, not of a spe­cif­ic man. Get it? You don't prove the big premise. On­ly the lit­tle, mean­ing­less premise, that M.M. (not Mar­i­lyn Mon­roe) had a child. Who gives a damn?

The se­cret the Church is try­ing to keep se­cret, the se­cret the Pri­o­ry is not try­ing to make pub­lic any­way... does­n't mat­ter. It does­n't cause what the church fears, it does­n't cause what the Pri­o­ry hopes, it does noth­ing.

So, re­al­ly... much ado about very lit­tle. If I were the church, I would let them say what­ev­er they wan­t, and noth­ing would hap­pen. Ab­so­lute­ly noth­ing.

Not to men­tion that the apoc­ryphal Leonar­dian de­vice, the cryp­tex... it's ... I have no word­s. If you missed it, the idea is that there is a pa­pyrus in­side it, and a vial of vine­gar. If you try to open it with­out the key, the vine­gar "dis­solves the pa­pyrus".

Do you know what pa­pyrus is? It's made of the stems of a plan­t, and it looks a lot like pa­per.

It's cel­lu­lose. It does­n't dis­solve in vine­gar. It's like say­ing let­tuce dis­solves on vine­gar.

You can make a pa­per that dis­solves on vine­gar, but pa­pyrus is not pa­per.

It may make some sense if you said the ink used dis­solves on vine­gar, but it's not what they said. What they said is stupid.

So, it de­fies rea­son how so many peo­ple can en­joy a book based on a premise in­no­cent of log­ic, about a con­spir­a­cy to pro­tect noth­ing.

Python-v4l: neat!

Think­ing about Cher­ryTV and ways to turn it in­to a re­al ap­pli­ca­tion, I thought the worse piece of it was the re­liance on v4lctl, and how re­al­ly you just don't know if it works or not, and how you can't fine­tune, and what­ev­er, and run in­to Python-v4l.

It has re­mained ap­par­ent­ly un­touched by two years, but I man­aged to build it with one ed­it and to make it work by switch­ing a line to an al­ter­nate ver­sion (they are both there), and it's nice.

Here's the ex­am­ple TV view­ing ap­pli­ca­tion us­ing it:

#!/usr/bin/env python
# Sample TV viewing application for pyv4l >= 0.3 - by Michael Dove
#<pythondeveloper@optushome.com.au>
# Note: this does the imaging in grab mode. Performance is limited.
# I average 35 fps @ 320x240. Disabling the writes to the tk window yeilds 90+ fps.

import v4l
import Image
import ImageChops
WIDTH = 320
HEIGHT = 240
vid = v4l.video('/dev/video')
cap = vid.getCapabilities()
print "Device Name: %s" % cap[0]
print "Type: %d" % cap[1]
print "Channels: %d" % cap[2]
print "Audios: %d" % cap[3]
print "Maximum Width: %d" % cap[4]
print "Maximum Height: %d" % cap[5]
print "Minimum Width: %d" % cap[6]
print "Minimum Height: %d" % cap[7]
vid.setupImage(WIDTH, HEIGHT, v4l.VIDEO_PALETTE_YUYV)
print vid.getChannel(0) # TV
vid.setChannel(0) # set to TV
vid.setFrequency(216250)

import Tkinter
tk=Tkinter.Tk()
import ImageTk
photo = ImageTk.PhotoImage("RGB",(WIDTH,HEIGHT))
label= Tkinter.Label(tk,text="mini TV",image=photo,width=WIDTH,height=HEIGHT)
label.pack()

vid.preQueueFrames()
nextFrame = 0;
vid.setVolume(5)
vid.mute()

try:
    while 1:
        output = vid.getImage(nextFrame)
        im = Image.fromstring("RGB", (WIDTH, HEIGHT), output)
        # update Tk label
        photo.paste(im)
        tk.update()
        nextFrame = vid.queueFrame()

except Tkinter.TclError:
    print "something"
    pass
vid.mute()

If you have seen the equiv­a­lent C ap­p... well... nice job here!

Great radio show, for free.

It re­al­ly hurts my pro­duc­tiv­i­ty, be­cause I can't un­der­stand a ra­dio show in eng­lish and code at the same time (although I man­age to pre­tend to chew gum and walk), but hey... it's Penn Jil­let­te, and I love the guy.

You can lis­ten to his show for free here: http://pen­n.freefm.­com/

Have fun!


Contents © 2000-2020 Roberto Alsina