Saturday, 31 August 2019

Censorship, Wikipedia and manga online links

I have a few posts that link to various sites that provide free online viewing of manga. Recently, I've been getting DMCA notifications about "copyright infringement", therefore I am replacing them with Wikipedia links. I am aware that whoever sent those notifications is wrong, since they can't possible have copy rights for links of sites they do not control, but I am not going down that rabbit hole. Google still works, after all.

And speaking of Wikipedia, I've recently been to Turkey where I was shocked to see that the entire Wikipedia site is blocked. According to Wikipedia, the site is or was censored in one way or another in China, France, Germany, Iran, Pakistan, Russia, Saudi Arabia, Syria, Tunisia, Turkey, United Kingdom, Uzbekistan and Venezuela. Hmm, France, Germany and the UK, huh? I wish you'd have said something, visitors from those countries... assuming my blog is not censored as well, [intense stare into the future, horizon and the wall in front] as the shining beacon of freedom it is for the entire world [snapping out of it].

Anyway, seems that only China and Turkey are seriously banning the Wikipedia articles, so I've added a way to "Fix" the links by replacing them with Google queries *if* you are in Turkey, China or Taiwan, thanks to ipapi for the user location detection service.

Friday, 30 August 2019

Istanbul, not Constantinopole

Intro


Istanbul is a beautiful lie. You are being served, begged of, you can haggle any price and no one will get upset, you are a king among serfs, everything is ancient, colorful and traditional. But as you walk around in the high but pleasant sea-side heat you can't help but wonder: how high was that initial price if you can lower it again and again and again? How are you a king while walking in the most populous city of one of the most powerful countries in the region? Why are there armored cars here and there, watching you while you unsuccessfully try to reach Wikipedia on your cell phone in Democracy Park? How can all these traditional shops sell the exact same thing all over the city? Why are there so many types of tea in the bazaar, but when you go to a cafe they only serve one?

Now, I enjoyed my visit to Istanbul. My hotel was sub par, but I didn't care about it too much because the staff was doing their best to be accommodating. Yet there are some things I would have liked to know before going there. Here are my thoughts.

Prerequisites


The first thing to consider when going to Istanbul is if you want to rent a car. The answer to this is "I do not want to rent a car, because I want to survive this vacation". The driving is chaotic and the roads are steep and crowded. Most of the time you don't even want to take cabs. People cross the street randomly and there are scooters that speed onto any temporarily free surface. Yet, except a motorcycle guy that probably died on the freeway, I have not seen even a car bump in this mess. To be a driver in Istanbul is both a badge of honor and skill and a psychiatric condition. You've been warned!

The second thing you need is select the part of Istanbul you want to be based in, because the city is vast and split by the sea into three parts: two in Europe and one in Asia. If you are a touristy kind of person, go to the Sultanahmet, Eminonu side. If you want more authenticity, real people living their lives, go to the Asian side, while the other European side is more for the city lifestyle and shopping, like in Taksim square. I haven't been to the modern part of the city, but from afar the buildings there look tall and beautiful and I am told it's great, too.

You've got to be careful choosing your hotel. Istanbul is so chocked with them that when you look at the map you feel that you have not zoomed in enough. In fact every building in some areas is a hotel and all that separates them are small windy one car streets: no side walk, no parking spaces, no green space. You have to pay attention to the pictures of the hotel, to how may rows of windows they have, for example. It will tell you how tall they really are and how many windows your room will have. A lot of these places have large lobbies and terraces, but it's where you enter the hotel and where you get breakfast in the morning, while your room might have just a window overlooking a fence. I've seen rooms that had no windows. So it is vital you speak directly to the hotel and discuss the conditions of your rooms (do not trust they will get the information from Booking or act on it). It's not that they want to cheat you, but everything in Istanbul is negotiable. You need to speak to an actual person. The city abhors algorithms.

One more important thing is your infrastructure. You need information and transportation. In Istanbul a lot of transportation works with an IstanbulKart, an electronic card you can put money on and then pay for trams, buses, ferries, etc. Cabs, of course, are different. Careful with the cabs: you might get a perfectly good one from the airport, with a meter and a credit card reader, then get another that only accepts cash and you must negotiate the price. Now, it might feel like a waste, but I recommend you get one kart for each person. While you can very well use only one for an entire group, I got into the situation where my wife passed and I didn't, so she had to wait until I found a recharging station and had to negotiate with the Turkish only interface.

That gets me to the information portion: Turkey is not in the EU. That means that calls and SMS messages are very expensive and probably mobile Internet as well. While most shops have WiFi, when you are on the road you need Internet. If you have a dual SIM phone (and even if you don't) I recommend you buy a prepaid Turkish card for your Internet and local calls. I didn't do that, so I got stuck a lot of times. As so many translation systems work online, too, I think it's a good idea. Everything in Istanbul is in Turkish, with occasional afterthoughts about other languages. People there know very little English and when they do, you are not sure if they understood what you told them or they simply don't want to appear stupid.

The fun


The fun is all on you! I won't tell you what is good and what is not, because not one of the people that prepared me for my trip had an experience even close to mine. It's not that I am special, but people really are different and Istanbul provides differently depending on your style. What I can tell you is that it is a city worth visiting, but perhaps not for the usual reasons. It feels different. It's not a clone of all the other cities I've been to. It really has its own culture, it's not overwhelmed with the same multinational corporations, it doesn't have banks and pharmacies everywhere, and the lack of rules (or the difference in them) opens the mind to possibilities.

For me the mosques were all the same, the palaces were just buildings with old furniture in them, the museums collections of objects with little life to them. For example I went to the Royal Kitchens in Topkapi; there was nothing to reflect the life that went on there. Just random kitchen implements nicely ordered inside transparent cages. I didn't find the haggling with shop owners pleasant or the ice cream seller antics entertaining. The food was nice, but not extraordinary. The bazaars were full of shops that sold the exact same things. I couldn't get close to a shop without someone harassing me about buying or entering. These are not the reasons why I enjoyed Istanbul.

Instead, it was the weird combination of new and old, of people living their lives differently, the all present sea breeze which made the heat bearable. It was the way people did all of these annoying things and yet I felt no malice from or toward them. It all felt viscerally eternal, like this city had the power to survive the world encroaching on it.

I don't know, maybe you just need to have played Quest for Glory II to feel this way. Or maybe it's just me. I don't think I would want to return soon, but it's an experience I recommend. And now, try to get this out of your head:

Thursday, 29 August 2019

Vita Nostra (Метаморфозы #1), by Marina Dyachenko, Sergey Dyachenko

book cover Imagine Harry Potter were a Russian girl named Sasha Samokhina. Instead of an Oliver Twist childhood followed by the happy admission to a place of high learning, she starts off within a happy family and then is forcefully inducted into a village institution apparently bent on making people crazy upon punishment of hurting said family. Instead of a loyal gaggle of friends to help the hero through random quests, it's a bunch of normal kids that either hate her, ignore her or get infatuated with her for their own random reasons. Instead of a nasty revenant with superpowers, she has only her own weakness and her insane teachers to fight against. And most of all, everything she achieves she does through effort, not by being lucky, getting powerful items from mysterious friends or being helped by previously unknown actors.

This is Vita Nostra - and not a book about Italian mobsters as the title made me believe, a book written by two married writers, Marina and Sergey Dyachenko, who wrote 26 other books before this you probably have never heard of because they are in Russian and no one bothered to translate them to English. I wonder if I would have ever heard of them if there weren't currently living in California. There are, of course, similarities to Harry Potter: the same idea that teachers perceive pupils as incompetent infants that cannot be trusted with information and power, for example. The same underestimation of children leads to both the successes of Potter and Samokhina (if hers can be called successes, it's a Russian book after all). There is also the isolation of children, away from family, friends and the rest of the world, a typical indoctrination move. Will our hero keep her morals or succumb to the ideas forced upon her by cruel educators? Will the teachers be proven right and their methods validated, or are they just assholes? Is this really a Hogwarts thing or more the Stanford Experiments meet 120 Days of Sodom? Well, that is for the reader to find out, as they go through the three books (yes, Russians are affected by trilogiopathy as well).

Warning, though, the book starts very slowly and with a style reminiscent of a lot of stories I disliked profusely: the dream sequence, where you cannot be certain that what the character perceives is real or not. Also, the ending is abrupt and says almost nothing. Oh, yes, I can speculate, but would be the point of that? In order to understand what is going on, you just have to read at least the second book as well.

Bottom line is that I liked the book after I got through the slow beginning, I was captivated by the lead character and I found it hard to put the book down, but it's not always easy to empathize with Sasha and the rest of the characters are not deeply explored.

Quakeland: On the Road to America's Next Devastating Earthquake, by Kathryn Miles

book cover We trust the ground beneath our feet as something solid that can take our weight, keep our structures straight, holds fast. Yes, we read things, we know about tectonics, but other than that, everything is stable. In the very beginning of Quakeland, Kathryn Miles thoroughly debunks that idea: Earth is an ocean of lava upon which very thin amalgamations of sand and rubble float precariously. What we call faults are just the largest of cracks, stable and classifiable; there are many more that we have no idea exist, fragile enough to be affected or even created by human activity. At this point, I was expecting an exciting journey through the center of the Earth. If the book would have continued as it started, it would have been a solid five stars, an educational tool to teach what most of the people have no idea about: the fragility of the thin crust we call solid ground. Alas, it was not to be.

The rest of Quakeland, let's say the last 80%, was a very US-centric analysis of how neglected earthquakes are when constructing and maintaining American infrastructure and a fear inducing series of "what-ifs" and possible disasters affecting that one country. I shouldn't have expected anything else, I mean the subtitle is pretty clear, but how can someone switch registers from talking about the very structure of the planet to the measly issues of one country and its weird measuring units? And maybe she did not use the almost ubiquitous bus size, but Miles did use the swimming pool together with the M-scale (do not let any "serious" seismologist hear you talk about Richter), the miles, the feet, the pounds, etc. The writing is competent and almost formulaic in structure, but I can't say I had any issues with it.

The bottom line is that the beginning was brilliant, the information that fracking (and mining in general) - regardless if it is toxic, damages the ground water or anything else activists throw at it - causes long series of earthquakes that affect whole areas while and even after operations cease, as powerful political and economic forces deny and actively fight the science that demonstrates this was new and important. Yet other than that it was just a normal reporter speculating about the possibilities of quakes - man made or not - causing serious harm. A lot of terribilism and fear mongering. That is why I can't really recommend this book and I will rate it as average only.

Wednesday, 21 August 2019

Installing emacs on Windows 10 linux subsystem and Android

Here are the steps for installing Emacs on Windows 10:
  • First enable the Linux subsystem:
    • Start Powershell as administrator
    • Type 'Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux' and confirm
    • Restart computer
    • Go to Windows Store and search for 'Linux'
    • Install Ubuntu, SUSE or anything you like from there and run it
  • Second, install Emacs:
    • Type 'sudo add-apt-repository ppa:kelleyk/emacs'
    • Type 'sudo apt update'
    • Type 'sudo apt install emacs25'

At this time you should have Emacs running in the Linux subsystem on Windows 10.

You can also install it on Android:
  • Install the Termux app
  • Type 'apt update'
  • Type 'apt install emacs'

But why would you need to install Emacs at all? Because now you can run 'emacs -batch -l dunnet'. Don't forget to 'save'! :D

Monday, 19 August 2019

Timers that capture the execution context, evil AsyncLocal and the quick and ugly solution used by Microsoft devs

It all started with the source code for NonCapturingTimer, a static factory class that was creating a System.Threading.Timer without capturing the execution context and was described as "A convenience API for interacting with System.Threading.Timer in a way that doesn't capture the ExecutionContext. We should be using this (or equivalent) everywhere we use timers to avoid rooting any values stored in asynclocals.". What did that even mean?

An issue opened by David Fowler sheds some light on this: "Any lazy activation of timers will capture the ExecutionContext. Combining this with a lazy initialization of the HttpClient and the handler graph may end up holding onto AsyncLocals for longer than expected. This could end up looking like a memory leak". This follows a Twitter thread from Fowler declaring AsyncLocal as evil.

There are also multiple issues that have crystallized into a proposal for a future version of .NET: "Timer static Create methods that make rooting behavior explicit".

And if you look at the ASP.Net sources on GitHub, they do use the class mostly for one time timer calls and periodic cleanup calls. I should mention that Ben Adams from Microsoft calls this way of creating timers ugly.

I don't have the time to go down further on this rabbit hole, but maybe people will find answers here when looking into this and comment on their findings.

The Ten Thousand (The Macht #1), by Paul Kearney

book cover The Macht series is not related to anything Germanic, as the name might imply, but is instead inspired by the Greek Hoplites. Even if The Ten Thousand happens on another planet that has different continents and two moons and three intelligent races, Paul Kearney could have written it just as well as a historical novel set in ancient Greece, with Greek mercenaries getting hired by Persians as weapons in a civil war that went awry. In fact, the story really is inspired by an actual historical group called the Ten Thousand and the main character, with the unfortunate name of Rictus, seems to be inspired by that of real life Xenophon. The book seems to be a retelling of Anabasis.

Now, the story is well written and short. I read the whole thing in a day. It's like a 300 novel, with the courageous and lethal Macht force finding itself on a foreign continent, surrounded by overwhelming hostile forces and having to march through rough and deadly terrain in order to get home. There is a lot of fighting, technical and military, some romance, bro-mance and feudal politics, but it's essentially the story of a huge march seen through the eyes of an experienced soldier, but young and new to the mercenary troupe.

Bottom line: I don't know if I am going to read any other Macht book. This one felt self contained and I am not that much into ancient fights in the Bronze Age. I liked The Ten Thousand, though, and I recommend it as a short and captivating read.