Tuesday, 2023-08-22

A War of Empires: Japan, India, Burma and Britain: 1941-45, by Robert Lyman

An accessible and semi-revisionist[1] history of the Burma campaign in World War II. The author makes the case that the vast expansion of the Indian Army was one of the foundations for Indian independence, even if modern Indian historiography rather focuses on the collaborationist INA.

Another claim made is that Imperial Japan reached its culmination point in Burma, and the army’s commanders wasted the life of their soldiers with reckless abandon. Nor was there any significant attempts to exploit the resources of Burma (nor any other of the areas conquered by Japan) to further the war effort or to alleviate needs at home. After almost a decade of unrelenting warfare in China Japan had nowhere to go but down.

[1] in that 14 Army was hardly forgotten, but rather accomplished a lot despite limited resources.

Tuesday, 2023-07-25

🇸🇪 De kapabla av Klas Ekman

(Ljudbok, uppläst av Lo Kauppi, Figge Norling och John Lalér)

Kompetent thriller om ett par i 35-årsåldern som råkar ut för en olycka och gör allt, precis allt, för att dölja den. Mer absurdistisk än realistisk, men väldigt spännande. Reckommenderas.


Friday, 2023-06-30



Jun 2022 | Jun 2021 | Jun 2020 | Jun 2019 | Jun 2018 | Jun 2017 | Jun 2016 | Jun 2015 | Jun 2014 | Jun 2013 | Jun 2012 | Jun 2011 | Jun 2010 | Jun 2009

Sunday, 2023-04-30

Sunday, 2023-04-09

🇸🇪 Ingen vanlig pappa som man bara har av Johanna Wallin

(ljudbok, uppläst av författaren)

En spännande berättelse av kvinnan vars pappa försvann ur hennes liv - två gånger. En detektivhistoria över internet, i pandemins skugga.

Tuesday, 2023-02-21

🇸🇪 Händelser vid vatten, en roman av Kerstin Ekman samt en TV serie baserad på boken

Jag har inte läst mycket Ekman, inte sedan en av Katrineholmsromanerna vid universitetet, och det ångrar jag nu. Händelser… är en bra roman, en roman om en tragedi men framförallt ett porträtt av en tid och ett landskap. TV-serien fångar mycket bra - ibland håller den nästan sig för nära boken - men det förlåter man den. Båda rekommenderas varmt.

Friday, 2023-02-10

Hitler’s Monsters: A Supernatural History of the Third Reich by Eric Kurlander

A dense and scholarly works about the occult roots of the Nazi ideology, and the different strands of “border science”[1] and supersitions like astrology running in confused streams through the regime.

A chilling detail is that while the Nazis subscribed to the scientific idea of races (it was considered a science at the time), the inner circle did not view Jewish people are a separate race. They were apart from humanity, unhuman rather than subhuman, and their very presence corrupted the purity of all humans. Thus their extermination was warranted as a matter of humanity’s survival. According to Kurlander this explains the seemingly irrationality of devoting so much resources to the Final Solution as the Second World War drew to its close.

Another thing that struck me was the prevalence of “non-scientific” beliefs among many Germans and even more Nazis. The language of science was there but the beliefs were unscientific. This is close to today’s antivaxx sentiments where “skepticism” is really just pre-ordained conclusions.

[1] The author uses this term as a direct translation of the German Grenzwissenschaft, as opposed to the English term “fringe science”. The term is still in German use.

Friday, 2023-01-13

Beyond the Burn Line by Paul McAuley

A quick read but I was sorry it was, reading McAuley is always a treat.

Protip: don’t read the Goodreads blurb about this, just go in blind. It’s more fun that way.

Thursday, 2022-12-01

Advent of Code 2022

Project website: Advent of Code 2021.

This is a placeholder entry. Current progress can be tracked in the GitHub repo: https://github.com/gustafe/aoc2022#advent-of-code-2022. Comments for solutions are in Pod format in the individual solution files.

Previous years: 2015, 2016, 2017, 2018. 2019. 2020. 2021.

Related to this entry.

Wednesday, 2022-11-30

The moral bankrupcy of the IR “realists”

Only a so-called “international relations realist” can present these demands for an end of the war in Ukraine as “extremist”:

What I find especially striking is how liberal interventionists, unrepentant neoconservatives, and a handful of progressives who are all-in for Ukraine seem to have no doubts whatsoever about the origins of the conflict or the proper course of action to follow today. For them, Russian President Vladimir Putin is solely and totally responsible for the war, and the only mistakes others may have made in the past was to be too nice to Russia and too willing to buy its oil and gas. The only outcome they are willing to entertain is a complete Ukrainian victory, ideally accompanied by regime change in Moscow, the imposition of reparations to finance Ukrainian reconstruction, and war crimes trials for Putin and his associates. Convinced that anything less than this happy result will reward aggression, undermine deterrence, and place the current world order in jeopardy, their mantra is: “Whatever it takes for as long as it takes.”

I mean… yes? Putin is solely responsible for this war. The ideal end is for Russia to leave Ukrainian territory. Russia should pay reparations for the destruction it has wrought.

This same group has also been extraordinarily critical of those who believe responsibility for the war is not confined to Russia’s president and who think these war aims might be desirable in the abstract but are unlikely to be achieved at an acceptable cost and risk. If you have the temerity to suggest that NATO enlargement (and the policies related to it) helped pave the road to war, if you believe the most likely outcome is a negotiated settlement and that getting there sooner rather than later would be desirable, and if you favor supporting Ukraine but think this goal should be weighed against other interests, you’re almost certain to be denounced as a pro-Putin stooge, an appeaser, an isolationist, or worse.

Note to conflation of two separate things here: the supposition that NATO expansion caused Putin to start the war and that the likely end of the war will be a negotiated settlement or a frozen conflict. I personally am a pessimist. I do believe that a negotiated settlement is likely. But having the ideal of a full Ukrainian victory in mind is the morally correct one, not to try to aim for a settlement a priori.

But it is not clear to me that NATO expansion left Putin with only one option. Note that he himself did not refer to NATO in the beginning of the war, when he was sure he was going to force a regime change in Ukraine within days. Now that Russia is losing badly it’s “because of NATO”, but that’s because he, like the author of this piece, cannot see Ukrainians as a worthy foe.

By starting the war, Putin ensured that Finland and Sweden applied to join NATO, suddenly increasing Russia’s border with NATO by thousands of kilometers. So Russia has now a worse position vis-a-vis NATO than before the war, even discounting the sanctions and the billions of treasure lost to Ukrainian forces armed by NATO countries.

It’s possible that the hawks are right and that giving Ukraine whatever it thinks it needs to achieve victory is the best course of action. But this approach is hardly guaranteed to succeed; it might just prolong the war to no good purpose, increase Ukrainian suffering, and eventually lead Russia to escalate or even use a nuclear weapon.

Russia is not holding the line and calling for negotiations. It is using its cruise missiles and drones to deliberately target Ukrainian civilian infrastructure, in contravention of the laws of war. In every territory liberated by the Ukrainians, evidence of torture and mass murder by Russia has been uncovered. Every day Russia occupies Ukrainian territory increases Ukrainian suffering.

As to the nuclear threat, it’s real, but it’s not a war winning strategy. Either Russia employs a “tactical” nuke to strike Ukrainian military positions. Will this knock Ukraine out? Probably not, but it will condemn Russia to a pariah state. Likewise, literally flattening Kyiv with a strike to decapitate the leadership might end the war, but then Putin will have nuked the “cradle of Slav civilization” he was so bent on saving for “Greater Russia”.

In no way will employing a nuclear weapon “prove” that Russia is strong and capable of winning a war against one of Europe’s poorest countries. On the contrary, it will be very hard for Poland for example not to get nukes themselves, to defend themselves against an enemy that has shown it is fully prepared to use nuclear weapons in wars of aggression.

Friday, 2022-11-25

Parsing RFC 3339 timestamps using strptime in Perl

RFC 3339 is a subset[1] of ISO 8601 time formats for use in Internet communications.

An RFC 3339 timestamp can look like this: 2022-11-25T09:26:04+01:00.[2] This is the format required by the Atom and JSONfeed specifications.

Perl’s standard module Time::Piece has a simple string parsing functionality implementing the POSIX strptime format.

The problem is that the strftime directive %z does not match a timezone designation in the format +01:00, only +0100.

So to use Time::Piece to parse RFC 3339 dates, use the following Perl snippet:

my $string = "2022-11-25T09:26:04+01:00";  
$string =~ s/:(\d+)$/$1/; # strip last colon  
my $ts = Time::Piece->strptime($string, "%FT%T%z");   
# output Unix timestamp  
say $ts->epoch;

The %F directive represents the date %Y-%m-%d and is present as a GNU extension. It does not seem to be part of the original POSIX specification.

[1] For an exhaustive list of differences, see this page

[2] GNU date omits the separating T from its rfc-3339 output, but includes it in the iso-8601 version. Both indicate the timezone with a colon.

Sunday, 2022-10-23

[SvSe] Mest normala partidistrikt

Med hjälp av rådata från val.se körde jag lite statistik för att hitta vilket valdistrikt som var mest lik hela riket vad gäller partiernas procentandelar.

Jag beräknade avvikelsen genom att summera kvadraten på skillnaderna mellan varje partis procentandelar och partiets procentandel på riksnivå.

I tabellen nedan redovisas vilket distrik som låg närmast - och längst ifrån.

Jag beräknade även vilket distrikt där de olika riksdagspartierna hade mest representation, procentuellt sett.

Fördelning av partiernas procentandel i olika valdistrikt jämfört med riket

(Σ Δ2)
Antal röster
Riket6,755,0830,336,714,615,3419,1020,541,540,006 477 794
5,924,2929,766,514,527,1119,5420,951,415,171 351
Längst ifrånSödra Djursholm
1,112,113,336,769,878,2058,439,760,442 468,07902
Mest VMöllevångstorget S
44,5916,9419,762,942,710,473,766,941,882 145,77850
Mest MPSkarpnäck 2 Brotorp
21,4829,3629,204,612,701,035,175,970,481 240,441 257
Mest STjärna Allé
8,907,6167,961,620,490,973,406,962,101 920,43618
Mest CNorrflärke-Solberg
Mest LVästerled 15 Ålsten S
1,674,4210,8213,9617,804,8240,315,900,291 297,781 017
Mest KDNorsborg småhusområde
Mest MSödra Djursholm
1,112,113,336,769,878,2058,439,760,442 468,07902
Mest SDOderljunga
1,293,0714,386,301,136,7913,5752,990,481 386,25619

Här är en tabell över samtliga “övriga anmälda partier” i källfilen. Jag tog reda på dom distrikt där varje parti fick flest röster.

En del är starkt lokala. “Gula Västarna” fick en röst totalt, nära Järna. Andra går inte att hitta någon information om online, som “Eropean radical reflektion a european dream party ERR” (sic!). Även dom fick en röst totalt.

Övriga anmälda partier: distrikt med flest antal röster. Om ett distrikt har lika många presenteras den med flest avlagda röster totalt.
PartiBästa distriktAntal röster distriktAntal röster riket
Partiet NyansSpånga 27 Rinkeby mellersta (Stockholm)18928 352
Alternativ för SverigeDeje (Forshaga)1416 646
Medborgerlig SamlingFredsborg (Österåker)1812 882
PiratpartietHögskolan/Trängen (Skövde)239 135
MoDSödertälje 45 Järna landsbygd (Södertälje)126 077
Kristna VärdepartietKiruna nordost (Kiruna)245 983
KnapptryckarnaStenstaliden (Kristinehamn)115 493
Feministiskt initiativEnskede 24 Dalen V (Stockholm)73 157
Landsbygdspartiet OberoendeHorn-Hycklinge-Björkfors (Kinda)352 215
DirektdemokraternaHulta (Ronneby)61 755
KlimatalliansenAnten/Gräfsnäs (Alingsås)61 702
EnhetSödertälje 45 Järna landsbygd (Södertälje)51 234
SKPLindsdal NO (Kalmar)71 181
Socialisterna-VälfärdspartietVisby Bingeby (Gotland)21892
Nordiska motståndsrörelsenSunnansjö-Saxdalen (Ludvika)6847
Partiet VändpunktBrynäs Ö (Gävle)4419
BasinkomstpartietBullermyren (Borlänge)4374
Klassiskt liberala partietFalsterbo norra (Vellinge)3344
SKÅNEPARTIETSibbarp N (Malmö)6206
Sverige ut ur EU/Frihetliga Rättvisepartiet (FRP)Höganäs NV (Höganäs)5174
Förenade Demokratiska PartietNordöstra Göteborg, Angereds Centrum (Göteborg)9157
Stram Kurs SverigeHaninge 6 Källtorp (Haninge)3156
Kalle ankapartietLorensborg SO (Malmö)2131
Volt SverigeÅtvidaberg öst (Åtvidaberg)389
Partiet FrihetGottsunda Centrum (Uppsala)374
TRYGGHETSPARTIETLorensborg V (Malmö)266
NY REFORM (NR)Albydalen C/Rotemannen (Botkyrka)347
Ond Kyckling PartietMikael (Örebro)239
Politiskt SkifteSmålandsstenar Ö (Gislaved)321
MITT SVERIGEPåarp V (Helsingborg)319
FAMILJENS FRIHETSkarpnäck 21 Pungpinan mfl (Stockholm)216
Svenska RikslagenMjällby m fl (Sölvesborg)216
ValsamverkanspartietSpånga 11 Erikslund (Stockholm)216
Europeiska Arbetarpartiet-EAPUppsamlingsdistrikt (Stockholm)115
Common sense in SwedenEdsbyn (Ovanåker)210
SwexitpartietBrittsbo-Lugnviksstrand (Östersund)210
FrihetsrörelsenKista 3 Akalla N (Stockholm)18
Nu får det fan vara nogVitsand (Torsby)28
KärlekVästra Husby-Gårdeby (Söderköping)17
ReformpartietMargretelund N (Lidköping)17
Ändrings partiet revolutionHyltebruk (Hylte)17
ANARKISTERNANorra Örnäset (Luleå)16
Det minst dåliga partietVästerled 14 Höglandet-Olovslund (Stockholm)16
Nix to the SixVästra Göteborg, Fiskebäck (Göteborg)35
ANDOPARTIET45 Hagalund N (Solna)24
Fritt valUppsamlingsdistrikt (Uppsala)14
GRÖNA DEMOKRATERNårunga-Ornunga m.fl. (Vårgårda)14
NaturistpartietIggesund Söder (Hudiksvall)14
PaxBjörksättra-Högsättra (Österåker)24
SverigepartietHällingsjö (Härryda)14
Fattigmans partiÖ Tullingeberg (Botkyrka)13
Fria WermlandGrava (Karlstad)13
John MikkonenVästerljung (Trosa)13
Min röstHaninge 40 Krogtäppan och Sommarbo (Haninge)13
NeoteknokraternaBjuv 4 (Bjuv)13
Ny DemokratiStrandvägsområdet (Katrineholm)13
Partiet FolkomröstningFröslunda-Björkhultsvägen (Eskilstuna)13
BjornpartietVästra Lund-Trojenborg (Mjölby)12
FredspartietTaxinge (Nykvarn)12
Företaget SverigeJohannes 8 Karl Staafs Park (Stockholm)22
InvandrarpartietKålgården Ö (Jönköping)12
MajspartietTorn (Lund)12
SociallibertarianernaKomarken S-Grinden (Kungälv)12
YggdrasilMårtens Fälad (Lund)12
Enad Politik12 Södra Rotebro (Sollentuna)11
Eropean radical reflektion a european dream party ERRÖstra Göteborg, Utbynäs (Göteborg)11
FramtidsTro9 Huvudsta Centrum Ö (Solna)11
Gula västarnaSödertälje 45 Järna landsbygd (Södertälje)11
Humanistisk demokrati (HD)Backa-Eskilsby m.fl. (Härryda)11
KSPHöganäs västra (Uppsala)11
MonisternaMellanheden (Malmö)11
Nationalsocialistiska reformistiska PartietS:t Olov (Landskrona)11
Nya SamhällspartietLjustadalen-Johannedal (Sundsvall)11
OKHägersten 36 Västberga Ö (Stockholm)11
Positivt Samhällsinitiativ (PSI)Lövåsen (Katrineholm)11
Stora Norrlands oberoende FrihetspartiBacke (Strömsund)11
SVENSKARNABromma 24 Blackeberg N (Stockholm)11

Thursday, 2022-07-07

A simple update queue for HN&&LO

HN&&LO is chugging along fine, almost three years after release.

One thing that’s bothered me for a while is that I don’t keep the score and comments for Hackernews entries up to date in a timely manner. So far, I’ve been going back and re-reading last month’s entries but this means that the daily view generally isn’t up-to-date.

The HN API is hosted on Firebase and thus has the ability to get real-time data, but there’s no Perl interface to it, and I really don’t have time to tinker with an entire async setup for a page that’s updated every hour at most.

Instead I’ve implemented a simple queue to keep items up to date.

Every time I read new entries from HN, I add them to the queue. I set a time about an hour in the future.

Every ten minutes or so, I check for items that are older than the current time. If there are items, I compare the data stored in my database to the current status in HN. If there’s a change, I update my datastore and re-submit the item into the queue about 2 hours in the future.

If an item is unchanged, I re-submit it 2 times in case it gets some attention.

If an item is “low score” (currently max 2 upvotes and no comments) it’s given on more chance before being removed from the queue entirely.

I’ve been working on a crude visualization of the queue, it can be seen here:


I log items that are added to the DB here:


Hopefully this will make the main page a bit more informative than before, although just as slow.

Friday, 2022-07-01

Microblog blatherings, June

Get ‘em half-fresh here: https://gerikson.com/m/2022/06/index.html

Tuesday, 2022-06-07

Microblog blatherings, May

It’s where the action is.

Like and subscribe, as the saying goes.