Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

Cloud Atlas

Fin­ished read­ing Cloud At­las, gave it 5 start­s. Here's a quick re­view:

I am not go­ing to ex­plain this book. It's enough, I think, to say I loved it, and that it's strange, and that it's a bit of a mis­tery.

Imag­in­ing a uni­verse in which all the con­tents of the book could be re­al at the same time in a way that would al­low all the pieces to be writ­ten as they are and yet, be, some­how, not the nov­el they are, but a found ar­ti­fac­t, is both de­press­ing and el­lu­sive.

At the end, I felt some­thing I can on­ly de­scribe as ret­ro­spec­tive hope, the feel­ing that things were sup­posed to end up bet­ter, but that even as ter­ri­bly as they did end, were it not by that ear­li­er hope, they would have been more grim.

The con­trol the au­thor has over his own style is im­pres­sive. This book feels writ­ten by half a dozen com­plete­ly dif­fer­ent writ­er­s.

Some quotes (which may on­ly make sense once you read the book):

"The sun was deaf­'n­in' so high up, yay, it roared an' time streamed from it."

"In the first set, each so­lo is in­ter­rupt­ed by its suc­ces­sor: in the sec­ond, each in­ter­rup­tion is re­con­tin­ued, in or­der. Rev­o­lu­tion­ary or gim­mick­y? Shan't know un­til it's fin­ished, and by then it'll be too late"

"What would­n't I give now for a nev­er-chang­ing map of the ev­er-­con­stant in­ef­fa­ble? To posess, as it were, an at­las of cloud­s."

Nikola 4 Released

I have just up­load­ed re­lease 4 of Niko­la my stat­ic blog/site gen­er­a­tor. Here are some of the changes in this ver­sion:

Features

  • Pre­vi­ous/Next post links

  • Teas­er sup­­port

  • Sup­­port posts with HTML "sources"

  • Site check­­ing script (niko­la_check)

  • Max­i­­mum im­age size in gal­­leries

  • Im­age de­scrip­­tions in gal­­leries

  • Im­age ex­­clu­­sion in gal­­leries

  • Spe­­cial "draft" tag

  • Pret­­ty code list­ings ("­­code gal­­leries")

  • Page de­scrip­­tions

  • Easy theme tun­ing via Bootswatch

  • Sup­­port for We­bAs­sets bun­­dles

  • "Fil­ter­s" for pow­er­­ful file post-pro­cess­ing

Bugfixes

  • Im­proved HTML out­­put

  • Sup­­port mul­ti­­ple time for­­mats in post meta­­da­­ta

  • Slugi­­fy tag names for URLs

  • Ar­chive path and file­­name con­­fig­urable

  • Gal­­leries sort­ed by date (sup­­ports EX­IF)

  • Ro­­tate gallery thum­b­­nails (EX­IF)

  • Tag feeds in tag pages

  • Col­or­box sup­­port in re­struc­­tured text fig­ures

  • Fix for con­­tent dis­­­play­ing too wide

  • Changel­og

As usu­al, you can dis­cuss bugs or make fea­ture re­quests at the niko­la-dis­cuss group and I love to know of sites us­ing Niko­la.

Hope you like it!

Probando CloudFlare

¿Cuál es el ser­vi­cio de Clou­dFla­re? To­man tu DNS y po­nen un pro­xy in­ver­so en­tre tu si­tio y los clien­tes. Ese pro­xy in­ver­so en­ton­ces usa una CDN pa­ra ser­vir tu pá­gi­na des­de al­gún ser­ver en una ubi­ca­ción con­ve­nien­te, y pue­de rees­cri­bir el HT­M­L/­CSS/­JS de ma­ne­ras que lo ha­gan más rá­pi­do/ se­gu­ro­/­me­jo­r.

Así mis­mo se su­po­ne que pro­te­ge mi si­tio de dis­tin­tos ti­pos de ata­que (el úni­co que po­dría afec­tar­me es un DOS pe­ro gra­cias igual ;-)

Así mis­mo, ofre­cen una pla­ta­for­ma pa­ra que apps me pue­dan pro­veer ser­vi­cios co­mo de­tec­ción de in­tru­so­s, ana­lí­ti­cos y otro­s, que es una muy bue­na idea.

Así que me creé una cuen­ta en clou­dfla­re.­com y la con­fi­gu­rá pa­ra que //­ral­si­na.­me (que es es­te mis­mo si­tio ex­cep­to que no cuen­ta bien los co­men­ta­rio­s) sea ser­vi­do via Clu­dFla­re, y ral­si­na.­me se sir­va di­rec­to.

Con­clu­sio­nes has­ta aho­ra:

  • El se­­tup es muy fá­­ci­­l.

  • Fun­­cio­­­na, aún los fea­­tu­­res ex­­pe­­ri­­men­­ta­­le­s.

  • Pa­­re­­ce ser li­­ge­­ra­­men­­te más rá­­pi­­do, lo que no es una so­r­­pre­s­a, ya que el mi­­ni se­r­­ver que tie­­ne es­­te si­­tio tie­­ne bue­­­na co­­­ne­c­­ti­­vi­­dad y mu­­chos re­­cu­r­­sos li­­bres.

  • Ha­­ce un buen tra­­ba­­jo de op­­ti­­mi­­zar au­­to­­­má­­ti­­ca­­men­­te co­­sas de ma­­ne­­ras ge­­ne­­ra­l­­men­­te ace­p­­ta­­das co­­­mo co­­­rre­c­­tas (en otras pa­­la­­bra­s, mis nú­­me­­ros de Pi­n­­g­­dom y YS­­low me­­jo­­­ra­­ro­­n)

Así que no due­le, ca­paz que sir­ve. Creo que voy a mo­ver to­dos los si­tios es­ta no­che.

Sometimes More is More

Y sí, eso es 90% cier­to. Ex­cep­to cuan­do es fal­so, por ejem­plo cuan­do me com­pré una cam­pe­ra.

Es una lin­da cam­pe­ra, y si la mi­rás así no­más no vas a ver un fea­tu­re im­por­tan­te: dos bol­si­llos de ca­da la­do.

Pen­se­mos en por­qué que­re­mos bol­si­llos en los cos­ta­dos de las cam­pe­ra­s:

  1. Pa­­ra me­­ter las ma­­nos cuan­­do ha­­ce frío. Co­­­mo es una ca­m­­pe­­ra grue­s­a, eso es im­­po­r­­tan­­te. En cli­­mas mo­­­de­­ra­­dos co­­­mo es­­te, los guan­­tes no va­­len la pe­­na, y me­­ter las ma­­nos en el bo­l­­si­­llo al­­can­­za.

  2. Pa­­ra me­­ter co­­sas que no son ma­­no­­s: lla­­ve­s, te­­lé­­fo­­­no, pla­­ta, ca­­ra­­me­­lo­­s, etc.

Pa­ra el pri­mer ca­so de uso, que­re­mos bol­si­llos en un án­gu­lo ba­jo, pa­ra que la ma­no en­tre na­tu­ral­men­te, ca­si ho­ri­zon­ta­le­s. Ade­más que­re­mos un ac­ce­so sin obs­tá­cu­lo­s, asi que sin cie­rres, que ade­más ras­pan.

Pa­ra el se­gun­do ca­so, que­re­mos que las co­sas no se cai­gan. O sea que pue­de ser un bol­si­llo ver­ti­cal (tal vez con ta­pa) o con un cie­rre. Los cie­rres tie­nen el pro­ble­ma adi­cio­nal de que te po­dés ol­vi­dar de ce­rrar­lo­s, y las co­sas se caen. Los bol­si­llos ver­ti­ca­les son ho­rri­bles pa­ra me­ter las ma­no­s.

Así que mi cam­pe­ra tie­ne dos bol­si­llos de ca­da la­do, uno con cie­rre, uno sin cie­rre. Uno pa­ra las ma­no­s, el otro pa­ra las co­sas. Co­mo es grue­sa, no se ve, a me­nos que se­pas lo que es­tás bus­can­do, y el mo­do de uso es tri­via­l: to­do va en el bol­si­llo ce­rra­do me­nos la ma­no. Has­ta pue­do pal­par el con­te­ni­do de un bol­si­llo des­de el otro, sin sa­car las ma­nos de sus bol­si­llo­s.

Es­te es un ca­so don­de más es má­s, com­ple­jo es me­jo­r, las op­cio­nes es­tán bue­na­s, y los de­faul­ts no im­por­tan. Aho­ra, si en­con­trás un lu­gar en el so­ftwa­re en que pa­se lo mis­mo, ahí te­nés una opor­tu­ni­da­d.

Nikola: Filters & Bundles

Two up­com­ing fea­tures for the next re­lease of Niko­la, my stat­ic site gen­er­a­tor, due some­time in Au­gust.

Filters

Fil­ters let you post­pro­cess your out­put. Think of it like in­sta­gram for web­sites, but use­ful. You can con­fig­ure per file ex­ten­sion a se­ries of python func­tions or shell com­mand­s, which will be ap­plied in place to the out­put file.

For ex­am­ple, sup­pose you want to ap­ply yui-­com­pres­sor to your CSS and JS files:

FILTERS = {
    ".css": [filters.yui_compressor],
    ".js": [filters.yui_compressor],
}

There, filters.yui_compressor is a simple wrapper around the command so that it applies in-place to the output files.

If you use strings there (untest­ed), they are tak­en as com­mand­s. The "%s" will be re­placed by the file­name, the usu­al crazy shell quot­ing rules ap­ply:

FILTERS = {
    ".jpg": ["jpegoptim '%s'"],
    ".png": ["pngoptim '%s'"],
}

Keep in mind that the fil­ters mod­i­fy the out­put of Niko­la, not the in­put, so your im­ages, CSS, and JS files will not be touched in any way. And of course chang­ing the fil­ters ap­plied to a file will force a re­build, so you can ex­per­i­ment freely.

Bundles

Hav­ing many sep­a­rate CSS or JS files is usu­al­ly a nono for per­for­mance rea­sons be­cause each one may in­volve a sep­a­rate HTTP trans­ac­tion. The so­lu­tion is to "bundle" those files in a sin­gle, larg­er file.

The rea­son not to do that is that usu­al­ly it means hav­ing a huge, un­com­fort­able thing to han­dle. So Niko­la tries to give you the best of both world­s, by let­ting you have sep­a­rate files, and bundling them (or not) on build.

There is a new option, USE_BUNDLES that defaults to False, and there are some changes in the theme templates so that it uses the bundled version when needed.

This was on­ly pos­si­ble thanks to We­bas­sets. How­ev­er, if you don't have We­bas­sets in­stalled, or you don't en­able USE_BUNDLES, this should cause no changes in the out­put.

Conclusion

These new fea­tures will al­low Niko­la users to im­prove their site's per­for­mance with min­i­mal tweak­ing, which is al­ways a good thing.


Contents © 2000-2024 Roberto Alsina