Highlights for Rust for Rustaceans

For example, there cannot be two parallel flows with mutable access to a value. Nor can there be a flow that borrows a value while there is no flow that owns the value.
Freeing the memory twice could have catastrophic consequences.
If you just want to leave some valid value behind, std::mem::take 2 is a good candidate. It is equivalent to std::mem::replace(&mut value, Default::default()); it moves value out from behind the mutable reference but leaves a new, default value for the type in its place.
but as we dive deeper into the more complex parts of Rust, you will need a more rigorous mental model to work with.
The aim of this chapter has been to establish a solid, shared foundation that we can build on in the chapters to come.
False sharing occurs when two different CPUs access different values that happen to share a cache line; while they can theoretically operate in parallel, they both end up contending to update the same single entry in the cache.
Simply stated, the orphan rule says that you can implement a trait for a type only if the trait or the type is local to your crate.
For example, consider a type like SshConnection, which may or may not have been authenticated yet. You could add a generic type argument to SshConnection and then create two marker types: Unauthenticated and Authenticated. When the user first connects, they get SshConnection. In its impl block, you provide only a single method: connect. The connect method returns a SshConnection, and it’s only in that impl block that you provide the remaining methods for running commands and such.
you can see the building blocks in the RawWakerVTable type in the standard library.
In a way, unsafe is misleading as a keyword when it is used to allow unsafe operations through unsafe {}; it’s not that the contained code is unsafe, it’s that the code is allowed to perform otherwise unsafe operations because in this particular context, those operations are safe.
In practice, the safety and performance trade-off for unchecked methods is rarely worth it. As always with performance optimization, measure first, then optimize.
and then document them rigorously.
Not all code is written in Rust. It’s shocking, I know.
Instead, as shown in Listing 3-2, we can introduce a generic parameter on Rocket, Stage, and use it to restrict what methods are available when.
Rust Fuzz Book (https://rust-fuzz.github.io/book/)
Rust Cookbook (https://rust-lang-nursery.github.io/rust-cookbook/), which suggests idiomatic so
the Tokio project has published mini-redis (https://github.com/tokio-rs/mini-redis/), an incomplete but idiomatic implementation of a Redis client and server that’s extr
Philipp Oppermann’s Writing an OS in Rust (https://os.phil-opp.com/) goes through the whole operating system stack in great detail while teaching you good Rust patterns in the process. I also highly recommend Amos’s collection of articles (https://fasterthanli.me/tags/rust/) if you want a wide sampling of interesting deep dives written in a conversational styl

Highlights for It’s Not About the Burqa

I might not have heard the word ‘feminism’ yet, but I knew that the way women and girls were treated in Saudi Arabia was wrong and that this was not the Islam I was taught, nor did it represent the home I was raised in.
I am Indian. Yoga runs through my blood, it’s as natural to me as my vitamin D deficiency.
And yet I was surrounded by a community that disapproved of this sort of independence. Any attempt to challenge the traditional roles was met with disapproval that quickly spread through gossip and manifested as social control.
Ideally the hijab mitigates instances where a woman is valued solely on her appearance and sexuality – though whether it successfully does that in such hyper-sexualized societies is a whole different discussion – rather it aims to place worth on her intellect, her actions, her character, and so forth.
hijab was and is supposed to be an expression of faith and Muslim identity – that’s where it began, and that is where it was supposed to end.
We find ourselves trying to categorize our decision by placing it in a framework that negates the idea of Islam entirely – a framework that believes religion to be contingent, merely a set of historical practices and rituals, that believes in a complete separation of religion governing our affairs; the idea we stick to because our religion dictates our way of life.
But no, I am just the frumpy hijabi on the tube, supposedly beaten into covering myself in this sweltering heat, a mute with no voice and no brain, indoctrinated by an extremist ideology and with no opinion of my own.
It was only after that appointment, once I had a name for what I was going through, that I started researching Islamic ways to cope with my emotions. But when I looked online, on social media and Muslim forums, I was struck by the overwhelming prevalence of one single idea: that you could not be Muslim and depressed, because a true Muslim would be content with what God had planned for them.
Therefore, when a Muslim whose mental health issues are tied up with one of these turns to the community, they often find nothing but judgement, when what they seek is the relief promised by the Islamic principles of mercy and forgiveness.
Muslims are constantly being reminded that we are all one ummah – that we are of one body, and when any limb aches, the whole body reacts with sleeplessness and fever.
But when other Muslims see that you are not praying, regardless of the reason, they can be extremely judgemental.
But there is a problem. This perspective disapproves of the hijab, the burqa, modest culture and other key elements of the Muslim female identity.
Mainstream feminism suggests that my choices and values can’t exist within its framework – if I make the decision to dress for my faith then I must be oppressed or submissive.
I grew up in a Muslim community whose cultural understanding of Islam denied equality of the sexes and rarely left room for female voices, let alone female empowerment.
They can’t entirely explain or point to the oppressor.
I don’t know a single woman who will tell their male manager that it’s period cramps that are hampering their work, and women who need to borrow a paracetamol or a sanitary towel hardly shout it across the office.
I think my father thought that this sudden determination to wear a hijab was down to religious zeal. I can’t really remember. I only knew that wearing it meant that you belonged.
Hijab has served me well. At times, it has covered my scars, allowing me to wear long-sleeved tops without anyone questioning what was hidden underneath. Other times, it has served to cover my earphones while I avoided listening to teachers drone on in class. Sometimes, very rarely, it has kept my head warm during cold winters. My hijab gave me a way to act, a code of conduct: smile courteously at strangers, open doors for people, help the elderly carry their shopping, and politely decline drugs/alcohol/male interaction as they are ‘not allowed in Islam’. My hijab was my armour, something for me to fiddle with when people asked me uncomfortable questions. It would allow me to look down and cover the acne growing on my forehead when someone attractive walked by. At times when I was tired or frustrated, I would untie and retie my hijab. Now, I do so with my hair. It’s not the same.
The fact is, shame is one of the biggest drivers of toxic masculinity within South Asian culture and especially amongst Muslim men.
and until we stop mollycoddling Muslim men there won’t be any substantial change.
There is a difference between guilt and shame. Guilt comes from recognizing one’s own mistake. Shame is heaped upon us by others. And there is a place for shame in society. It should be heaped upon the patriarchal cultures that subjugate women. It should be felt by the women who allow it to continue, both through their silence and their actions. It should be placed upon the men who stand by and allow their mothers, their sisters, their wives and their aunts to oppress women in the name of Islam, men who benefit from their privilege. And it also belongs to the men who abandon us to its effects, simply because they are too afraid to speak up.
My husband told me later that his father had an aversion to skirts and saw my wearing one as a personal affront. He had an aversion to and an opinion on many things, it would turn out.
The actual granting of my divorce was as simple as that, because Islam makes it that easy. It was culture and its contradictions that made my life complicated.
After my second divorce my father told my mother: ‘You will never stop my daughters doing what they want again.’ Having raised us as equals with our brother, he had had enough of his girls being maligned. After this, we stopped pandering to the community. Outwardly, I merged my eastern and western wardrobes, mixing kurtas with jeans and shawls. Inwardly, I stopped giving a damn about gossip. The worst had happened. I was the talk of the town and there was nothing more to lose.
My mother, of course, was still concerned. What decent man would marry me, especially now I was on TV? Nice Pakistani girls did not appear on screen.
The mindset that a woman might do the unthinkable and refuse a man, or that she could even kill a man through the shameful use of her sexuality, means that men believe women need to be controlled, and this theory is conveniently backed up by supposed theology, providing a safety blanket for a wider community that is polluted by chauvinism and fragile male pride.
I wonder if I would have been protected from the heartbreak and pain that came as a result of trying to please a community that demanded I live by their rules only.
Because women in such unregistered marriages cannot get a legal divorce, if the husband refuses to give an Islamic divorce, they are referred to as ‘chained women’.
Imams told me repeatedly that they were under pressure from their congregation not to register marriages as it would lead to women having legal rights.
People are surprised to learn that it is harder nowadays to get out of a UK mobile phone contract than it is to leave an Islamic marriage.
When Muslim women choose to take a stand and vocalize our opinions, there are always consequences to our dissent – especially because it flips the orientalist caricature of a passive, repressed woman being held hostage by the men in her community.
Timothy Mitchell, in Colonising Egypt, explains how colonial officers drew ‘a link between the country’s “moral inferiority” and the status of its women’. He explains that they regularly came back to the argument that ‘the retarded development of the nation corresponded [ . . .] to the retarded development of the Egyptian woman’.

Highlights for Becoming Trader Joe

We witnessed something very interesting: the United States had a quota for imported tuna. Once Peru’s quota had been filled, a biological miracle occurred right there on the canning line. What had been tuna was now pilchard, a member of the herring family, on which there was no quota.
The Adamsons were land-rich but cash-poor; they lacked the funds to develop the magnificent property. They were having to sell off pieces for far less than they potentially were worth.
The convenience store business is 90 percent real estate, 10 percent all other (merchandising, personnel, etc.). In real estate, it’s the tenant’s balance sheet that counts.
The question was never on the employment application forms, and it’s probably verboten to ask these days. But dyslexia lurks in the brain of every left-hander, which means, we see the world differently, sometimes profitably. That’s why, when I interview people, I try to get them to write something. At one point I was accused of running a cabal of left-handers at Trader Joe’s.
Today it would be fought over by the vulture capitalists, but neither ventures nor vultures were common in those days.
If all the facts could be known, idiots could make the decisions. —Tex Thornton
Trying to find an optimum solution in business is a waste of time: the factors in the equation are changing all the time.
This is the most important single business decision I ever made: to pay people well.
We really didn’t pay more per hour than union scale, but we gave people hours. Because union scale is so high, the supermarkets are very stingy with hours and will do anything to avoid paying overtime.
Time and again I am asked why no one has successfully replicated Trader Joe’s. The answer is that no one has been willing to pay the wages and benefits, and thereby attract—and keep—the quality of people who work at Trader Joe’s.
Much as I would like to pose as an altruistic visionary, my policy was grounded partly by the desire to stay un-organized by the Retail Clerks Union, which under the direction of the legendary Joe DeSilva terrorized the market industry of those days.
The problem with unions is not their pay scales; it’s their work rules and seniority rules.
In fairness, however, those work rules did not spring from the ground like dung beetles working it over. They came from inexcusable employer practices.
The buyers at the supermarket chains knew nothing about what they sold, and they don’t want to know. What they did know all about was extorting slotting allowances, cooperative ad revenue, failure allowances, and back-haul concessions from the manufacturers.
But the Byzantine management atmosphere at first Rexall and then Hughes Aircraft had convinced me that the only real security lies in having your own business, and this left-hander was well ahead of the curve on that one.
Also, I was convinced that I was on a holy mission in preserving a company owned significantly by its employees. My hope was that someday it would be 100 percent owned by them. On that one I proved to be wrong.
That’s why, throughout my career, my policy has been full disclosure to employees about the true state of our affairs, almost to the point of imprudence. I took a cue from General Patton, who thought that the greatest danger was not that the enemy would learn his plans, but that his own troops would not.
It absolutely addressed our prime market, the overeducated and underpaid people of California.
Being king of the low-price, high-value wine trade in California was one of the greatest satisfactions of my career.
But bran is a low-value product. They couldn’t afford to deliver it. Since they also packaged nuts and dried fruits, however, we somewhat reluctantly added them to the order. And that’s how Trader Joe’s became the largest retailer of nuts and dried fruits in California!
In the Insider’s Wine Report we gave the results of the wine tastings that we were holding with increasing frequency, as we tried to gain product knowledge. This growing knowledge impressed me with how little we knew about food, so in 1969, we launched a parallel series of blind tastings of branded foods: mayonnaise, canned tuna, hot dogs, peanut butter, and so on.
It’s the problems that create the opportunities. If a business is easy, every simple bastard would enter it.
For forty years supermarkets in California had operated on a simple formula: run weekend ads, promoting Best Foods Mayonnaise and Folgers coffee below cost to get the people in the door, and sell them full-profit milk and alcohol.
The progress of the internet and electronic interfaces is demanding new levels of trust between the retailer and the supplier. Under these new interfaces, the supplier automatically resupplies the retailer on the basis of scanning data, which goes online to the supplier without batch-by-batch purchase orders. Individual internet buying must also operate on severe rules of trust.
In 1982, we employed an Apple II to do most of the number crunching. That was a big help, but it didn’t solve the problem of the nightly communication to the bakers. Young Joe rigged up one of the first voice-activated computer systems in the U.S. to take the orders from the stores. It was daring and full of bugs, but it began to teach us about electronic ordering.
created an electronic ordering system on the Macs that fed into Guy Lundberg’s computer service. This was an enormous breakthrough. You need to understand that we were outsourcing not just the mainframe number crunching but the printing of the documents that it generated. High-speed printers were a big choke point. They had to spew out “picking” documents for the warehouses, “receiving” documents for the stores, and summaries for our Accounting Department.
Look at any supermarket ad. You’ll learn precious little about the provenance of any product in it; you’ll see only name, size, and price. Partly this is because the grocers themselves don’t know anything about the provenance of what they sell, and they don’t want to bring up the subject of individual differences.
A distinction between full-time and part-time is a false dichotomy, when it comes to productivity.
The real limit on what range of products we could carry was our product knowledge. I believe that the greatest advantage of a limited-SKU retailer is that the employees at all levels can become truly knowledgeable about what they sell
Giving discounts to people over sixty is, to borrow a phrase from Charlie Munger, “a type of dementia I can’t even classify.” Here you have the fastest-growing, most affluent part of the population, and you give them a discount? If anyone should get a discount, it’s the shrinking workforce, which subsidizes the old folks through their income and social security taxes.
All members of Central Management, including myself, worked in the stores those days as a matter of morale for the troops.
The same mentality that doesn’t want to rock the boat also tends to hold onto its job. You’ll encounter those guys again and again! Try to help them do a good job; make them feel important; and make them feel that you’re Playing the Game, not trying to abolish it.
Believe me, you have a system for everything that has to happen in your business—you just may not be conscious of it. And you probably have still other systems that are not needed. That’s why The Winning Performance calls for a “constitutional contempt for business as usual.” To practice “constitutional contempt,” you have to arrive at work every day with the attitude, “Why do we do such-and-such that way? Better yet, why do we do it at all?”
Why Did I Want to Get Rid of This “Free” Labor? Some of those guys steal. They steal by doing “fast counts” with your receiving clerk (some of those route men should be dealing blackjack in Vegas). That’s one big reason why the supermarkets went to “electronic receiving.” They also steal by putting high-value items in the “empty” cases they take back to the trucks. That was one reason I welcomed L’Eggs in its egg-shaped containers in the late 1960s: it was harder to hide L’Eggs in an empty soft drink case than flat-pack hosiery. Ask any grocer about this. The bread and cupcake guys are under heavy penalties if they bring too much “stale” back to the bakery. So they pick up out-of-code product from one store and “roll” it into the next. As the drug culture developed in the wake of Vietnam, route men evolved into natural distributors of the stuff. You never know when they’re going to arrive at the store: this makes labor scheduling difficult. Related to this . . . They always show up in your parking lot when it’s jammed. Or have you never been blocked from a parking space by a beer truck?
Because of internal theft, one of the most important non-merchandise suppliers may be a detective agency. It is very hard to find effective agencies. The nature of the work tends to attract unstable people.
And with eleven years of Stanford education between us, we could never be poor, just temporarily impecunious at times.
Not until months after Dan arrived did Thrifty Drug begin to have even the most basic financial reports needed to operate a $1.8 billion business.
This is one of the most important things I can impart: in any troubled company the people at lower levels know what ought to be done in terms of day-to-day operations. If you just ask them, you can find answers.

Property dealings in Berlin

Back when I read this exposé in November it struck me as gripping but also as something that could become messy. Turns out that’s true since the piece now has the mark “Censored” and some choice parts of text have been blanked out. I did a quick search but can’t find any updates what might have happened. If I find time later, I’ll look in the Wayback Machine to see what pieces of text disappeared.

The kind of property deals that are described in the article are par for the course in any up and coming city. Recently there was a piece about resistance to the city giving away one of its largest buildings to a private art gallery: https://www.freitag.de/autoren/der-freitag/portraet-wut-motiviert-mich

The academic backroom dealings should also be considered to be normal especially in small subfields such as Turkey studies. Academics are playing funding games more than they research and the web of foundations that float around are ways to creatively bookkeep and move money around. None of this is really surprising.

Wat is geweld? vroeg hij haar. Is het besmeuren van gebouwen gewelddadiger dan het blijven verbranden van kolen, terwijl we weten dat de broeikasgassen die daardoor in de atmosfeer terechtkomen een hoop leed veroorzaken, niet alleen voor toekomstige generaties, maar ook voor de minder gefortuneerde mensen die vandaag leven?

Good article about Malm. The answer to the question above should be: “All climate action is self-defense.”

It’s possible to draw a straight line from Malm’s book to the climate protests happening right now in Berlin where people block the city ring road, which makes him quite effective.

This is why recent developments in fields such as Afrofuturism and Black horror are so crucial. They provide a critical alternative to the alt-right’s exterminationist fantasy of an all-white future. Just as importantly, they offer readers other ways of thinking about time that do not fall in line with the fascist dream of a history that unfolds step-by-step along the lines of the Aryan dictator’s master plan.

https://lareviewofbooks.org/article/race-consciousness-fascism-and-frank-herberts-dune/