Monday, June 18, 2018

Good in Bed Guide to Female Orgasms, by Emily Nagoski

book cover Female Orgasms is not so much as a book, as a really tiny set of chapters that are barely connected to each other. Emily Nagoski is frustrated by the way male standards are used to judge all sexuality and makes a point in this booklet that it is unhelpful, at best. However, while some of the ideas in the book are interesting, to me it seemed as a list of ideas and ramblings gathered together in order to form a volume, with most of the things either really basic or without any narrative or connection to others. 100 ebook pages and 26 chapters, that's saying something.

The book is oriented towards women, with men as a secondary audience. It is not a self-help book for men to become gods in bed, it is a self-help book for women on how to become more aware of their sexuality and enjoy themselves better. Some of the ideas I found interesting are mostly related to expectations. If we know 95% of women masturbate with clitoral stimulation, why do we even consider the necessity for women to orgasm from vaginal intercourse? It's nice when it happens, but as opposed to men, women don't orgasm predictably nor is the orgasm the end purpose of sexual encounter. Another interesting fact is that women are mostly responsive to erotic stimulation, as opposed to men who just wake up one moment wanting to have sex. It's a statistical fact, but still, one to take into consideration. One idea that the author wanted to make clear is that there is only one orgasm: the explosive release of sexual tension. How that tension is generated doesn’t matter (to the orgasm).

An important concept that Nagoski is making efforts to popularize is the one of arousal nonconcordance. In other words, while for men there is a strong correlation between physical sexual arousal and the desire or openness for sex, for women it's not quite so. Experiments of people watching porn while devices compare their sexual arousal and also take their reported input of how aroused they feel show consistently this is true. I do feel, though, that the author pushes a little too far, attempting to completely decouple the declarative and physical arousal. Considering some men use opposing ideas as justification for non consensual sex ("your body wants it, so you must want it" kind of logic) that is understandable, but less scientific than I would have liked.

This book is part of a series about sexuality, written by different authors, called Good in Bed Guide. I found it basic, but probably helpful for a lot of people. I wish it would have been better written and edited, though. Also, try reading this on the subway with a straight face.

Friday, June 15, 2018

Do NOT delete the files in Windows\WinSxS

There is a folder that appears to be quite big when you analyze your drive: Windows\WinSxS. It reports many gigabytes of files. If you are low on space, you might be tempted to delete it. The problem is that the folder is full of hard links to files that are already stored in other places. In order to determine the true size of the folder, run this command with elevated privileges:
dism /online /cleanup-image /analyzecomponentstore
the output looks like this:
Deployment Image Servicing and Management tool
Version: 10.0.16299.15

Image Version: 10.0.16299.309

[===========================99.1%========================= ]

Component Store (WinSxS) information:

Windows Explorer Reported Size of Component Store : 7.03 GB

Actual Size of Component Store : 6.94 GB

    Shared with Windows : 6.06 GB
    Backups and Disabled Features : 687.18 MB
    Cache and Temporary Data : 194.21 MB

Date of Last Cleanup : 2018-06-15 01:02:45

Number of Reclaimable Packages : 0
Component Store Cleanup Recommended : No

The operation completed successfully.
The actual size used is the one in bold: 687.18 MB.

Deleting the folder or the files inside it will break your machine. Moving the files and copying them back will delete the hard links (freeing no space) then copy actual files instead, wreaking havoc with your system.

JSON.stringify with circular references and nicely indented

Sometimes you want to display a Javascript object as a string and when you use JSON.stringify you get an error: Converting circular structure to JSON. The solution is to use a function that keeps a record of objects found and returns a text explaining where the circular reference appeared. Here is a simple function like that:
function fixCircularReferences() {
  const defs={};
  return (k,v) => {
    const def = defs[v];
    if (def && typeof(v) == 'object') return '['+k+' is the same as '+def+']';
    return v;

And the usage is
. If you want to use it as a JSON (so serialize the object for real), replace the return of a string with
return null
, although that means you have not properly serialized the initial object.

The function is something I cropped up in a minute or so. If there are some edge cases where it didn't work, let me know and I will update it.

Thursday, June 14, 2018

Async/await world: casting an async method to Action irrevocably loses the awaitability

My colleague showed me today something that I found interesting. It involves (sometimes unwittingly) casting an awaitable method to Action. In my opinion, the cast itself should now work. After all, an awaitable method is a Func<Task> which should not be castable to Action. Or is it? Let's look at some code:
var method = async () => { await Task.Delay(1000); };
This does not work, as compilation fails with Error CS0815 Cannot assign lambda expression to an implicitly-typed variable, which means we need to set the type explicitly. But what is it? It receives no parameter and returns nothing. So it must be an Action, right? But it is also an async/await method, which means it's a Func<Task>. Let's try something else:
Task.Run(async () => { await Task.Delay(1000); });
This compiles. If we hover or go to implementation for the Task.Run method, we reach the public static Task Run(Func<Task> function); signature. So that does it, right? It IS a Func<Task>! Let's try something else, though.
Action action = async() => { await Task.Delay(1000); };
This compiles again! So it IS an Action, too!

What is my point, though? Consider you would want to create a method that receives an Action as a parameter. You want something done, then to execute the function, something like this:
public void ExecuteWithLog(Action action)

And then you want to use it like this:
ExecuteWithLog(async () => {
    Console.WriteLine("Start delay");
    await Task.Delay(1000);
    Console.WriteLine("End delay");

The output will be:
Start delay
End delay
There is NO WAY of awaiting the original method in the ExecuteWithLog method, as it is received as an Action, and while it waits for a second, execution returns to ExecuteWithLog immediately. Write the method like this:
public async void ExecuteWithLog(Func<Task> action)
    await action();
and now the output is as expected:
Start delay
End delay

Why does this happen? Well, as mentioned above, you start with an Action, then you need to await some method (because now everybody NEEDS to use await/async), and then you get an error that your method is not marked with async. Now it's suddenly something else, not an Action anymore. Perhaps that would be annoying, but this ambiguity in defining what an anonymous async parameterless void method is worse.

The Unholy Consult (The Aspect-Emperor #4), by R. Scott Bakker

book cover What the hell?! After starting with so much potential, the story started fizzling, but there still was a lot of room for greatness. Instead, Bakker seems to have contracted Martinitis for his last book in the series, having important characters die off randomly, insignificant ones suddenly pop up, and filling space with feudal descriptions of the battles fought by completely irrelevant characters. Oh, and talking about erect penises. And then the end comes, everything seems to come to some sort of confluence, only it actually doesn't. It all goes completely to the left. Things get confused, the story goes nowhere, and the reader goes to WTF land for the entire day.

What is the purpose of having the reader getting invested in characters, only to kill them off, then return them later on (oh, they didn't die!), only to have them do nothing or die (again!)? What is the point of reading the names of every leader of men and no-men while they battle gloriously, complete with a short description of these characters right before they die in said battle? Was this book written with dice?

The Unholy Consult is a complete disappointment of a series finale. It ends practically nothing! Consider that it all started with Drusas Achamian, as a learned, in love, slightly damaged magus who liked to consider the world with wisdom. At the end, he is a bumbling old buffoon who can't string a thought in his head. Esmenet, the ex-prostitute, chosen by Achamian for her beauty and by the Emperor for her intellect and strength for bearing his children, first rises to the challenge of being a queen, then is just hauled away like a child and just does random things. Mimara gives birth to twins. But one is dead. There is no significance to this at all, it's just a random event. The four horns... they appear and disappear in the plot, like they have some great significance, but they don't. Why write about one character almost a quarter of a book only to kill him randomly in the next? Why be so verbose for 95% of a book only to break out into incoherent scenes and inconsistent actions in the last tiny chapter?! And it goes on and on like that. There is no moral to the story, no resolution to the fact that we followed the action of a psychopath for twenty years of book time waiting for this precise ending, only to be robbed of any meaningful closure.

Bottom line: I guess the author has a "great vision" in mind. If Prince of Nothing was followed by The Aspect Emperor, then a new series of books follows which is, in fact, another volume of the story. Only I lost all interest. What is the point in following characters if the author is going to butcher them (and I don't mean kill them off) later on to the point of irrelevancy? What is the point of following a story, if it leads to nothing?

Tuesday, June 12, 2018

Saturday, June 09, 2018

Hagane no renkinjutsushi: Mirosu no seinaru hoshi (2011)

Fullmetal Alchemist: The Sacred Star of Milos is the film that banks on the hunger of Alchemists all over the world after the Brotherhood series ended. It is not a sequel, just a full feature film happening sometime around the 21st episode of the series. The story is complicated: three nations in turmoils, alchemy of all sorts, chimeras and in the middle of it all: Ed and Al, fighting for what is right.

I liked the story, it hit a lot of sour points of the present, with large nations literally shitting on smaller ones, while they can only maintain their dignity by hanging on old myths that give them moral rights over some God forsaken territory. What I didn't particularly enjoy were the characters and the details of the plot. There were many holes and, in all, no sympathetic characters. The few promising ones were only barely sketched, while the main ones were kind of dull. The animation also felt lazy. If this was supposed to be a send off for the characters, it exceeded its purpose, as now I am considering if I would have even enjoyed a series made in such a lazy way.

So, bottom line, part cash grab, part great concept. A promising film that reminded me of the series I loved so much a decade ago, but failed to rekindle the hunger I felt when the series ended. Goodbye, Elric brothers!