Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

New Site

Since pyc­s.net is bro­ken and I can­not fix it, I de­cid­ed to up­load my site to a new serv­er. And you may be there al­ready ;-)

Sad­ly all the com­ments (and there was some good stuff there) are mo­men­tar­i­ly lost.

But I am work­ing on it.

So, wel­come, and if you want to read about whether I got mar­ried or not, do so

So, I did get married

As I men­tioned a while ago, I had my mar­riage sched­uled for Feb. 18th (or 16th if you want the le­gal date).

Well, I did it. Rosario and I are hap­pi­ly mar­ried since then.

I promised to show a pic­ture of the wed­ding, and specif­i­cal­ly promised Taj it would be one where I was clear­ly vis­i­ble.

Since a prom­ise is a debt, you can see it. The pic­ture is not greate be­cause we still haven't got the pho­tog­ra­pher's. This one was tak­en by my sis­ter.

At the time, I had al­ready lost the suit­coat. Re­gard­less of how good your air-­con­di­tion­ing is, you just can't wear three piece suits on Feb­ru­ary in Buenos Aires.

Ev­ery­thing went quite won­der­ful­ly, ev­ery­one liked the even­t, al­though I still grum­ble be­cause I missed the best food be­cause peo­ple want­ed to talk to me!

All in al­l, a nice thing. I don't think I would do it again, though, a wed­ding is a hell of a lot of work!

No big hon­ey­moon yet, we in­tend to go to Tur­key (land of Rosar­i­o's an­ces­tors) some­time around oc­to­ber.

In the mean­time, we went to the Buenos Aires Beer Fes­ti­val with a bunch of friend­s, were we saw a show by Di­vi­di­dos, which is prob­a­bly the most in­cred­i­bly awe­some live rock band in the god­damn plan­et.

We al­so went on a week­end trip to Mar del Pla­ta to see my par­ents, and a whole lot of oth­er small things, in­clud­ing work­ing on the very next week af­ter the wed­ding. But it's all cool :-)

Silly idea to make Python popular

I have an idea that can kill the most fre­quent com­plain about python.

BPython.

BPython is a sim­ple wrap­per around py­h­ton which pro­cess­es a .bpy file, pro­duces a .py file, then com­piles it in­to a .py­c.

What does it do? It us­es braces to con­trol flow.

Since braces are ac­tu­al python syn­tax, you will have to use #{ and #}

As an added bonus, if you are care­ful, a bpython pro­gram will al­so be a valid python pro­gram.

Of course it has is­sues (like mod­ule load­ing) but those can be worked around.

The im­ple­men­ta­tion should not be more than 30 lines of python. Or bpython ;-)

Skeletons of stories that won't ever be written.

In­spired by "From Dusk Till Dawn".

Sto­ry Nr. 1: Night of the preda­tor

Gen­re: Su­per­nat­u­ral Hor­ror.

Notes: This sto­ry should be writ­ten in Love­craftian pros­e, and try to pro­vide a sense of fore­bod­ing, and im­mi­nent doom, while seem­ing com­plete­ly ob­vi­ous.

Fran­cis was the sev­enth son of a sev­enth son of a sev­enth son. As such, his fate was pre­or­dained. On ev­ery ful­l-­mooned fri­day, he would ex­per­i­ment a hor­rid trans­for­ma­tion.

He runs through the woods while re­mem­ber­ing the strange ad­mo­ni­tions from his fa­ther, who ex­plained to him the blood­thirst of the were­wolf, the hor­ror of his ac­tion­s, the curse up­on his vic­tim­s.

He feels a nag­ging sense of things be­ing all wrong. A hunger for strange, un­named things. An ea­ger­ness for for­ward mo­tion. A preda­to­ri­al wish.

Then, while in the wood­s, look­ing at the moon, he ex­pe­ri­ences a painful elon­ga­tion of his body, a con­stric­tion of his limb­s.

His skin changes quick­ly, his teeth grow too long and sharp for his mouth.

He flops around for a minute or two and dies.

The sev­enth son of a were­wolf is a were­shark.

The rest of the sto­ry is a CSI-style po­lice pro­ce­dur­al about the ori­gin of a shark corpse 500km away from the sea, the pro­tag­o­nists are park ranger­s.

Sto­ry Nr. 2: The man with the gold­en brain

Gen­re: bon­di­an su­per­spy.

Notes: This should in­clude a lot of tech­no­jar­gon which makes no sense, and the prose should be quite bad. Think Ian Flem­ing.

Our su­per­spypro­tag­o­nist is tasked with de­stroy­ing the world-de­stroy­ing weapon of a thirld world dic­ta­tor with a sur­pris­ing­ly large mous­tache and a beret.

This dic­ta­tor's head­quar­ters are be­neath a vol­cano, and his weapon would de­stroy the world by pro­vok­ing catas­tro­phes of a very com­pli­cat­ed na­ture (to be de­ter­mined. ideas: drive all farm an­i­mals in­to a killing fren­zy, make all 7up bot­tles ex­plode at ran­dom times, turn cock­er spaniels in­to evil sci­en­tist­s).

Our hero en­ters the lair through some com­pli­cat­ed path in­volv­ing sew­ers and airduct­s.

He is cap­tured by the evil tyran­t, and tied to a ta­ble with a gi­ant laser aimed at his groin.

While the tyrant pre­pares to kill him in this over-­com­pli­cat­ed man­ner, the hero says "be­fore I die, can I ask you one thing?".

The tyrant replies by blow­ing hero's head with a colt 45 then says "Hel­l, no!" [1].

Unim­ped­ed in his plans be­cause all in­dus­tri­al­ized na­tions re­lied on a sin­gle guy work­ing alone, he black­mails all the world in­to sur­ren­der.

The rest of the movie is a geopo­lit­i­cal thriller about:

  • The dif­­fi­cul­­ty of rul­ing the world from an un­der­de­vel­oped coun­try, with em­pha­­sis on tele­com­­mu­ni­­ca­­tion is­­sues.

  • The eco­log­i­­cal sit­u­a­­tion stem­ming from the forced un­de­vel­op­­ment of West­­ern Eu­­rope and North Amer­i­­ca in or­der to re­­duce the stress on the en­vi­ron­­men­t.

  • The psi­­cho­log­i­­cal stress­es on the world pop­u­la­­tion when they re­al­ize their lifes de­pend on the whim of the guy with the big­ger gun.

  • The com­­pas­­sion­ate rule of the afore­­men­­tioned tyrant and benev­o­­lent di­­ca­­tor for life, who pro­ceeds to dis­­arm all armies (in­­clud­ing his own), and nev­er ac­­tu­al­­ly us­es his weapon.

Epi­logue:

200 years lat­er, the im­pos­si­bil­i­ty of re­mote­ly con­trolled ex­plo­sive 7up bot­tles is ter­mi­nant­ly proven.


[1] This is tak­en from the "Guie for the Per­fect Tyran­t".

My first interesting hack

In the pre­vi­ous ar­ti­cle, some­one sug­gest­ed cheat­ing on ex­ams as an in­ter­est­ing ap­pli­ca­tion of telepa­thy.

Which re­mind­ed me of my first in­ter­est­ing hack.

I was in col­lege, back when com­put­er time was al­lo­cat­ed by the hour, and I had no com­put­er, and I was about to take my fi­nal ex­am on lin­ear pro­gram­ming.

For those who are not fa­mil­iar with the term, lin­ear pro­gram­ming is not re­al­ly about pro­gram­ming. It's about solv­ing a spe­cif­ic ind of op­ti­miza­tion prob­lem­s.

And for those who don't know that, don't swaet it, it re­duced, in re­al 1989 life, to ap­ply­ing a pro­gram called LIN­DO to find a lo­cal or glob­al min or max for a func­tion.

Now, we were a poor col­lege, so there were like 10 com­put­er­s. For 5000 stu­dents. And we, in that sub­jec­t, were not al­lowed to use it.

And it did­n't have lin­ear pro­gram­ming soft­ware in it any­way. And it had no com­pil­ers or in­ter­preters (ex­cept qba­sic).

So, we did LIN­DO by hand. On pa­per (the Sim­plex method­).

And it was bor­ing. But we did it. It is pret­ty sim­ple once you get the hang of it. But you have to make hun­dreds of cal­cu­la­tion­s, so we were al­lowed cal­cu­la­tors.

And I had this ba­by.

I had bought it with my sec­ond pay­check as a teach­er as­sis­tan­t. It cost­ed me about the same as a small bike.

Or a TV.

And it had 4KB of ram, an ascii key­board, and 116 pre­loaded pro­grams for com­mon sci­en­tif­ic cal­cu­la­tion.

It was the best cal­cu­la­tor I ev­er had :-)

And it was pro­gram­mable in BA­SIC.

So, the night be­fore the ex­am, as I did a sam­ple drill, I de­cid­ed to im­ple­ment a solver.

But since we had to solve things on pa­per, I had to show in­ter­me­di­ate step­s.

So, in­stead of a pro­gram to solve the prob­lem, I wrote a pro­gram that solved step-by-step as done by hand. Which was about 20x hard­er.

And it did fit and run in the 4KB of ram, and it dis­played the in­ter­me­di­ate re­sults on the 2x32 char screen.

Sad­ly, there was no way to take a pro­gram out of it, so it was lost on the next bat­tery change.

But hey, I think that was nice :-)


Contents © 2000-2024 Roberto Alsina