Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

Mama Don't Let Your Baby Grow Up To Be a Cowboy^W Lisper

For­get about it, co­w­bo­ys are fi­ne. Let them grow up to be co­w­bo­ys, I do­n't ca­re. But Lis­per­s... nah. Ok, no, the­re is­n't an­y­thing wrong about Lis­p, or about using Lis­p, or about peo­ple that use Lis­p.

The­re is, ho­we­ve­r, so­me­thing wrong about being a Lis­pe­r, the kind of per­son that takes ad­van­ta­ge of any mo­ment to look do­wn on any co­de and say "oh, this in Lisp would be clea­ne­r/ea­sie­r/s­hor­te­r/­fas­te­r/­tri­via­l/whate­ve­r".

And I must con­fe­ss I ha­ve be­co­me that per­so­n, but wi­th Py­thon ins­tead of Lis­p. So I wi­ll be doing so­me no­n-­p­y­thon co­ding pro­jec­ts this yea­r. Be­cau­se clo­seness means bad perspec­ti­ve, and be­cau­se I do­n't want to be that per­so­n.

So, C++ he­re I co­me (ba­ck). I see you'­ve chan­ge­d. So ha­ve I. Le­t's gi­ve us a chan­ce.

The Golden Ring

When I was in Pa­ris, it ha­ppe­ned to me ten ti­mes or mo­re. Wa­lking on a pu­blic pla­ce, a man or a wo­man would pop out of no­whe­re, gol­den ring in han­d, and say "he­y, mis­te­r, is this your­s?"

It's a we­ll kno­wn sca­m. You get to keep the rin­g, and the ring bea­rer wi­ll ask you for so­me com­pen­satio­n. It wi­ll turn out the ring is wor­th­le­ss, so you wi­ll be out a cou­ple of eu­ros or so.

It's in­te­res­ting in so­me wa­ys, thou­gh.

  • It re­­lies on the vi­c­­tim being dis­ho­­­nes­­t, si­n­­ce the ring is not thei­r­s.

  • The amount of mo­­­ney gai­­ned by the sca­­m­­mer is at the vi­c­­ti­­m's dis­­cre­­tio­­n.

  • If you do­­n't gi­­ve the sca­­m­­mer an­­y­­thi­n­­g, he wi­­ll, at mo­s­­t, ye­­ll at you for being a cheap ba­s­­ta­r­­d, and it's do­­­ne in ve­­ry pu­­blic pla­­ce­s, so the dan­­ger of vio­­­len­­ce is ne­­gli­­gi­­ble.

  • Si­n­­ce the vi­c­­tim is al­­so doing so­­­me­­thing mo­­­ra­­lly re­­prehen­­si­­ve, and lyi­n­­g, the risk of the sca­­m­­mer being cha­r­­ged wi­­th an­­y­­thing is ne­­gli­­gi­­ble.

It's al­most like so­me sort of weird sale:

"He­re's so­me­thing of no va­lue that looks va­lua­ble! Is it your­s? (I know it is­n'­t)" "I wi­ll bet on it being va­lua­ble and pre­tend it's mi­ne!" "So, how mu­ch is appea­sing your re­mor­se about sca­m­ming me out of a pro­ba­bly wor­th­le­ss ring wor­th?" "I'd say 3 eu­ro­s, my good man!" "Dea­l!"

How can it be wor­th their whi­le to do this? I would guess their suc­ce­ss ra­te at perhaps 5% and they pro­ba­bly do­n't make mo­re than 5 eu­ros on a suc­ce­ss­ful tran­sac­tion

All in all, it see­ms fair­ly har­m­le­ss, just an­no­yin­g, and fren­ch peo­ple ha­ve ac­tua­lly cha­sed me do­wn the street to re­turn me so­me­thing I for­got in a ba­r. Then agai­n, I al­so was peed on a foot by a bad­ly bur­n-­dis­fi­gu­red guy in a wheel­chai­r, on Champs El­y­sees, so YM­M­V.

2012

Así que es­to es 2013. Si me de­cías que era 2012 te creía. ¿Có­mo me fue con mis re­so­lu­cio­nes pa­ra el año?

  • Di­­je que tra­­ta­­ría de es­­cri­­bir to­­­dos los día­s. Eso se­­rían 366 po­s­­ts, y fa­­llé mi­se­­ra­­ble­­men­­te. Po­s­­teé 215 igua­­l, que es un mo­n­­tó­­n.

  • Que­­ría me­­jo­­­rar en mi tra­­ba­­jo. Creo que lo hi­­ce bue­­­na pa­r­­te del año, aun­­que el úl­­ti­­mo mes e can­s­an­­cio me ju­­gó en contra. Me doy un apro­­­ba­­do.

  • La salud me­­jo­­­ró. Pe­r­­dí pe­­so (aun­­que re­­cu­­pe­­ré una pa­r­­te) y la pre­­sión vie­­ne bien. Los ni­­ve­­les de ene­r­­gia me­­jo­­­ra­­ron mu­­cho.

  • Mi ma­­tri­­mo­­­nio va me­­jo­­­r. Creo que el año más fe­­liz des­­de 2008.

  • No me arre­­glé los dien­­tes por una co­­­sa de pre­­pa­­ga­s. De­­be­­­ría es­­tar bien pa­­ra ma­r­­zo.

Bo­nus:

  • Lle­­vé a mi ma­­má a Pa­­rís.

  • Hi­­ce al­­gu­­nas mo­­­vi­­das pa­­ra lo­­­grar una se­­gu­­ri­­dad fi­­nan­­cie­­ra a la­r­­go pla­­zo.

  • Di la cha­r­­la de cie­­rre en Py­­co­­­nAr

  • Re­­su­­ci­­té ba­s­­tan­­te mis pro­­­ye­c­­tos de so­­­ftwa­­re li­­bre.

Así que ... ¡No muy ma­l!

Pa­ra el 2013:

  • Vo­l­­ve­­mos a lo de arre­­gla­r­­me la bo­­­ca.

  • Voy a tra­­tar de ba­­jar mu­­cho más de pe­­so.

  • Apun­­te­­mos a 200 po­s­­ts.

  • Voy a tra­­tar de es­­cri­­bir un li­­bro en­­te­­ro.

  • Me voy a ope­­rar los ojos pa­­ra de­­jar de usar an­te­o­jo­­s.

Ve­re­mos co­mo sa­le.

Client-rendered, one-URL, dynamic, static site.

My va­ca­tions end to­mo­rro­w. So, the ti­me to spend ha­cking fun, per­so­na­l, free stu­ff is going to be li­mited be­cau­se of the ti­me spent co­ding fun, free stu­ff for mo­ney. So, I de­ci­ded to fi­nish wi­th a bit of whi­ms­y.

I im­ple­men­ted a com­ple­te­ly clien­t-­ren­de­re­d, one-UR­L, dy­na­mic blo­g. Whi­ch is ac­tua­lly to­ta­lly sta­ti­c.

In fac­t, that blog is this blo­g, just wi­th a twis­t. If you go to this URL you wi­ll see wha­t's ba­si­ca­lly this ve­ry si­te, wi­th co­m­men­ts and eve­r­y­thing as usua­l. But if you cli­ck on "Pre­vious Pos­t" ... we­ll, it sta­ys in the sa­me pa­ge, even thou­gh it dis­pla­ys a di­ffe­rent post :-)

The ma­gic is the new, ex­pe­ri­men­ta­l, dy­na­mic ta­sk_­mus­ta­che plu­gin for my sta­tic si­te ge­ne­ra­to­r, Niko­la. whi­ch does the fo­llo­win­g:

  1. Ren­­ders post da­­ta as JSON fi­­les in­s­­tead of HT­­ML

  2. Crea­­tes a HT­­ML fi­­le that is rea­­lly a mus­­ta­­che.­­js te­m­­pla­­te

  3. Crea­­tes a HT­­ML fi­­le wi­­th so­­­me bi­­ts of Ja­­va­s­­cript that loads the te­m­­pla­­te and the newest po­s­­t's da­­ta.

  4. If you ac­­ce­ss that mus­­ta­­che.h­t­­ml wi­­th a fra­g­­men­­t, it uses that to fe­­tch JSON da­­ta and rew­­ri­­te itse­l­­f.

And tha­t's it. It ac­tua­lly loads fas­t, and re­ge­ne­ra­tes ve­ry fas­t, sin­ce it does mu­ch le­ss than the real si­te. The­re are a bun­ch of things that wi­ll dump you out of the "d­y­na­mi­c" si­te, like tag li­nks, and whate­ve­r, but it wo­rks sur­pri­sin­gly we­ll (and if you want to the­me it, it's just one tem­pla­te).

This is the first of a new kind of thing for Nikola, the "extra plugins". Basically, stuff that is too weird, specific or useless for the general distro, will go there, and to use those plugins, you have to create a plugins/ folder in your site and add it there manually.

En­jo­y!


Contents © 2000-2023 Roberto Alsina