Blog Posts

May 1, 2023

A Brief and Impassioned Review of Hamilton the Musical and my Love/Mostly Hate Relationship with America

Here me out. I love black washing US history. We all know Beethoven was black. I am convinced Pushkin only ever really fired on D’anthes after D’anthes used the n word, alledgedly. I am not here to provide proof, I’m just saying I can go all day with black washing history but Hamilton has reveled most of it is wishful thinking. Like of course Pushkin didn’t fye on D’anthes for the n world, allegedly. My spite for European treatment of… a lot, kinda ruins my love for black washing history. At least as much as any other order to restrict freedom kinda ruins the fun of history. My grandmother didn’t pick cotton as a child because of the Ottomans though.

While listening to Hamilton I cannot exist in a position where viewing the events unfolding are unconditionally positive for me. I mean at best Aaron Burr gives life to an abolitionist, alledgedly. Meanwhile Hamilton at the side of a man with slave teeth. How that work?? I do not wanna hear you one more time king. Boooo!!!! Beat it!!! You got teeth to remove from your slaves. Go home roger!

Now I say all that but my moral high ground is kinda ruined when Lin Manuel Miranda says his name is Alexander Hamilton. I mean this is worlds longest running democracy. They did not explicitly write race and class into the Bill of Rights technically, which is like kinda cool, maybe a low bar given liberty being a pretty important thing then, alledgedly. But the shit slap. The example Washington set by leaving office was revolutionary in an era of Bolivars and (Napoleons one and two). This is the world’s longest lived democracy!

Longest Democracies

By the time raisse your glasss to freeeedom comes on I’m in. For just a second I feel patriotic. And I am like “is this what white people feel all the time???? like they belong to a historical struggle for freedom rooted in the founding of the US???? Then it’s back to massive anti trans legislationand me celebrating when Hamilton ruins his career writing a public letter talking about why he cheated on his wife. Thanks Hamilton for not talking less. THEN the bozo tells his son to attend a duel and NOT shoot. My man you a goof. Big goof Burr smoking on the Hamilton pack #PACKWATCH #RIPBOZO REST IN PISS YOU WON'T BE MISSED 💯💯 bozo

I suppose my favorite thing about the musical is that Hamilton is a goof and Burr is a dummy. I am moved to set the bar extremely low for large groups of people, especially us in America, which is cathartic.

March 1, 2023

Where to go from here

Things are complicated

My interest lately is in how knowledge is structured and acted upon. I want to explore how and why technology becomes a lens and a vehicle for cognition, reasoning, and understanding.

For instance, due to the advent of computers we recently became able to view cognition algorithmically.

A more interesting example may be considering it *necessary* to create "social hierarchies" in multi agent AI systems so that they don’t spend their time plotting on us.

In what way are they a social order? Why would we create existential threats to ourselves? Are we liberally applying our conceptual framing of social phenomena to algorithms?

Stranger still, we *could* model this behavior using reinforcement learning agents, and it is useful for training agents to complete task. Maybe deployed AGI should use some optimal agreement with its implementers to guide its action to the most appropriate course given some contract.

Fuck all that though. My original issue is not with any of this. Its that we can derive behavior from our ideas in anyway that bothers me.

I wish to be a fish

Others Have Thoughts on This

finna pull out this armchair real quick, lemme get comfortable

Week 9 Lecture: Kant Transcendental Aesthetic Part 1

Week 9 Lecture: Kant Transcendental Aesthetic Part 2

These two videos are exciting because Kant makes reasonable pushback against knowledge as purely relative to brain composition. It cannot be that a giant set of pulleys and levers used the right way creates conscious perception, that is, image laden abstract thought that contain beliefs. But there is a considerable separation between causality and perception. We do not know if math is made up or “transcendental“. And more strangely, we can’t really be aware of ourselves. The subjects seem to have believed on some level that keeping their hand in the water longer could give them a different kind of heart. Dr. Tversky declared that people have a cognitive blind spot to "hidden variable" causation, and this explains the Calvinists who made such an effort to live virtuously

We cannot identify self in any meaningful way without the umvelt. Thats good news for me. Our perception is contingent! It’s not random! Objectivity, while not observed is arguably achievable with a decent model. Its unlikely that interplanetary qualia are consistent, but I would guess intelligence is consistent in modeling the world for some objective. We could get Arrival aliens or we could get X-Files, but I highly doubt what we consider intelligence does not in fact exist on a spectrum directly related to its physiology.

So, where to go from here?

Over the years I have been eased into bits and pieces of Hegel through fan girling over Zizek or watching youtube. To define a freedom as an abstract thing with spirit and a history we move toward never really became sensible until a short youtube clip. Hegel: Philosophy of world history and spirit. This idea of spirit is the virtual realm of Serial Experiments Lain. The constant unfolding of history is our reality. An all powerful god whom we compel to exist through its eventual demise within us.

More grounded is Sciences du Design editor, Stéphane Vial’s take on technology and perception. In Being and Screen, Vial use ontophony to explain a theory of how our *perception is virtual*. It is based on ontophany theory, according to which the process of appearance of being is constantly technologically conditioned. Thus, technologies are not only tools; they are structures of perception. This theory proposes that we think about design not as producing beings but, rather, events; not things that are but things that happen(okay, clearly reader/readwise needs built in citations for text paste). Our countries then are virtual af, guided by this virtual spirit. Peter Drucker, management guru, also believes in a mythic quality to states. From The Drucker Lectures:

the very fact that we have a myth of the state—that is, that we can rationalize our experience—also shows that man is not all political animal, and that his existence is not described or circumscribed by his belonging to the group. Ants and bees are as much social animals as man. An ant or a bee can even overthrow the ruler of the swarm and establish his own rulership. But only man can change the basic order of the group itself, only man has the myth of the state

By highlighting knowledge management systems as endemic to large scale civilization, it made more reasonable this notion “spirit of freedom” searching to express itself historically.

The irrigation city first had knowledge, organized it, and in-stitutionalized it. Both because it required considerable knowledge to construct and maintain the complex engineering works that regulated the vital water supply and because it had to manage complex economic transactions stretching over many years and over hundreds of miles, the irrigation city needed records, and this, of course, meant writing. It needed astronomical data, as it depended on a calendar. It needed means of navigating across sea or desert. It, therefore, had to organize both the supply of the needed information and its processing into learnable and teachable knowledge. As a result, the irrigation city developed the first schools and the first teachers.

Interesting as well is what this means for spirit’s drive toward freedom versus managing a society for some purpose. Are both part of the spirts drive?

### Getting Back to That

Three questions I asked before are:

  • How are contemporary technologies wholly affecting the way we cognize the world?
  • What drives the mapping of lived experience onto technology?
  • What flips the medium of technology to drive a hyperreal imitation of references to itself, such that the reference loses context to what technology itself abstracts?

I am skeptical of these questions being so dense, but I now have better understanding of some fundamentals that bridge our willingness to make myth real and our willingness to create despots.

  • I believe it best to think of the way we conceptualize our world as virtual. Not detached from material circumstances, yet all in all separate. Therefore, technology manifest as both the material and the symbolic structuring of experience.
  • To answer my second I would say technology is the artifact created by mapping lived experience over a medium, ie: lived experience -> media -> technology.
  • To answer my third is more difficult. Potentially the spectacle brought about in a capitalist society trading use-value for a Walmart in every city. Maybe we live in a hyperreal world. Im not sure, but I feel Debord, Borges, Lacan, Neil Postman could be of assistance here.

As such, I would like this article to be an intention for my interest going forward.

  • I will read Ken Binmore’s work on game theory and society. I am excited to see how and why he uses Hume as opposed to Kant for his philosophical interest. I suppose it has something to do with this quote by Binmore from Natural Justice:

As Hume explains: “I learn to do service to another, without bearing him any real kindness, because I foresee, that he will return my service in expectation of another of the same kind, and in order to maintain the same correspondence of good offices with me and others.

  • I will read Kant’s Critique of Reason and Hegel’s Science of Logic as well. But I’ll give myself a year.
  • I also want to finish Being and Screen and the Drucker Lectures.
  • I will revisit Debord, Foucalt and Postman.
  • I will read far more than I write about.

I recently watched Mullholland Drive and I think this clip is a good idea of how societies work.

LLTNF

December 16, 2022

A Rant on "The Genetic Lottery" by Kathryn Paige Harden

Personally, it is so weird being black.

You tell people that being poor inhibits my chance at a life of liberty in the pursuit of happiness, and Kathryn Paige Harden says "Bet, let me test your genes to make sure you can tho?"

You tell people that the barrier of entry to higher education creates inequitable outcomes, but Kathryn Paige Harden asks, "Seriously tho, we should map your genetics to verify that?"

You tell people access to food, water, and shelter has an impact on the quality of life(basic shit), yet Kathryn Paige Harden say, "Mmm, I'm not convinced, let us do a longitudinal 14-year study on material conditions."

You tell people social safety nets help support in raising children, and it's "Welfare queen says what?"

Kathryn Paige Harden didnt say that.

You tell people hey, the death penalty is a horrible thing that is rarely used and is applied to black people more so than others, but Kathryn Paige Harden says "Lemme use your DNA to tell the jury why you inherited making bad choices."

There are extremely common sense explanations of these behaviors already but all that's standing in the way of good research is racism(proponents of eugenics and population sterilization) and wokism(gut flinch reaction to genetic testing by minorites) apparently. We may have created entire social institutitions to address these concerns but now, more than ever genetic testing is what we need?

Make no mistake, the future of genetics will be about ensuring inequitable access to revolutionary genetic treatments that will extend the life of the children and grandchildren of our global elite. Not addressing decades old research on inequality. I am not even refuting the point of her book(genetic inheritability is a useful tool for understanding inequality). Liberals should own some argument on the use of genetic research. I just fail to see how the examples she explores help. We have answers to every single issue she brought up. They are not mysteries. Genetic testing may be able to explain circumstances but outcomes?

Porque los nos dos - see: nature vs. nurture

However, genetic inheritability can disadvantage certain genetic clusters which can have a impact on racial gaps. I question whether the entire population of AA neatly falls within the population she examines, why racial gaps arise due to genetic inheritance, how genetic clusters arise in genetically similar populations, how genetic inheritablity differs in those groups, and if a racial component of this closeness matters genetically. It would be nice to hear that. Maybe I should read her research.

December 11, 2022

Emperor, Hostage, Despot!

Nationalist Power Dreams of Empire

My exploration of major European ideological shifts began with Michel Foucault’s Discipline and Punish, which illuminated the transition from sovereign power to institutional control, offering a framework for understanding modern mechanisms of governance. This was complemented by Hannah Arendt’s On Revolution, which dissected the complexities of political revolutions and the challenges of establishing lasting freedom and Robert Owen Paxton’s The Anatomy of Fascism, which revealed how societal conditions and manipulated sentiment can foster extremist ideologies. Underpinning my views is a a sort of techno determinism, influenced by Marshall McLuhan’s The Medium Is the Massage, which reshaped my understanding of how communication technologies shape perception and behavior, a perspective further enriched by studies like Being and the Screen and timelines such as The Evolutions of Traditional to New Media. Finally, Robert Sapolsky’s Behave provided a biological and environmental lens for understanding human behavior, tying together the interplay of power, perception, and ideology that continues to shape our world. All lead me to believe:

  • 16th-century ideology to today in Europe/US/Australia/Canada (I may refer to as EUSAC) should be interpreted anthropologically. Think rise of material standards because colonialism as opposed to some historical determinism set out by Fukuyama.

  • pre-revolution and post-revolution France, Russia, and the US were concerned with centralized power.

  • Fascism is a conservative brain phenomenon in societies that are stressed and can be identified by

    • homogenous identities
    • the need for “an enemy”
    • populist leaders
    • wealthy conservative elite

Very much today’s worst case in the US... In March Jeff Sharlet, Vanity Fair contributing editor, tweeted that the “intellectual New Right is a white supremacist project designed to cultivate non-white support,” and he linked it to resurgent nationalist and authoritarian politics around the world: “It’s part of a global fascist movement not limited to the anti-blackness of the U.S. & Europe.” — James Pogue,

We Crave Daddy. Own Us Daddy. Be a Despot!

During a recent road trip, I listened to the revolutions podcast. The whole thing. What stood out through 17th-19th era of revolution was Napoleon Bonaparte, an accomplished Corsican general of the middle class who rose to become an emperor for a short while. Like a hundred days. I had always shit on France for having a revolution just to restore a king. And you know, wildly decapitating people.

And I use to think, yeah, the state monopolizes power so of course a king may be convenient. But no. Kings are disposed often. Like in the Northman movie. Bro really left his wife and child for honor? This y'all power fantasy?

I also wonder if Napoleon’s success could be seen as a triumph of the liberal policies France introduced through revolution. More puzzling about the restoration of the monarchy was that the French revolution was directly concerned with figures like Napoleon rising to power. Who held the authority to tax citizens and build armies *competently* was the main catalyst for the revolution. The rights of the three estates had all been radically altered to more generally suit the French population’s needs in the midst of an economic crisis. And though members of the council watched Napolean's rise with extreme scrupulousness(while trying not to be killed), the people chose him to represent them. At least until the forces of a united Europe brought about a good chance for french liberals to dethrone Napolean. His heir nonetheless still has a claim to this day.

Hostages to Nationalist Power Fantasies of Daddy Owning Us

Zizek describes monarchs as having the appearance of rule. These figures are unfortunately tasked with bearing the burden of the masses as well as their own greed. He says these figures are at their best in their himbo-bimbo era. Motivated monarchs should be feared. Is it possible cult-like leaders are the only egomaniacs who would take on the task of fronting civilization building? I doubt that, but we love them.

This thought keeps me up at night. There is no singular authority. Most often, whatever whims can be met by a state as transmitted through some society. I know, I learned a lesson Foucault reiterates over and over. Power and knowledge are capricious constants bubble from below. I suppose the upside is we can construct institutions such that the wildest threat to them is absorbed. These threats should make the future of human organizations a bit more of an object to reason about. Fascinating it is for anyone to become emperor; more fascinating is to create a society in which emperors get wrecked. I now have a new belief:

  • Hierarchical leaders may or may not be corrupt but their power is being the foreign relations person for the group. It is valuable to have a monarch as a group pathologizes its place in the world.

August 22, 2022

Rules for Radicals

Chicago is a horribly corrupt place to live to this day

Revolution for as long as I can tell meant violent popular uprisings. Consider Haiti, Puerto Rico, Cuba, Algeria, China, India, South Africa, America etc. Zizek spoke on the Kurdish city that was able to obtain something of a utopian order in his latest book Heaven in Disorder but nah, they losing. Socotra, Columbia, Venezuela, Taiwan, Libya, Rwanda, France, etc…

I mean here’s the large pink striped elephant in the room. Power does not give itself up. Maybe the last ten years were better than the ten before that. But these battles are far from deterministic, with a huge asterisk coming.

Socialist ideology could be found in southern mill culture. Mill families could extend credit, borrow money, and rely on the mill community to keep it going. What happened to that? Well, in the face of terminal lung illness, competing against black education, and the real dead end of the mill, people began organizing and asking for rights. This was happening right beside prohibition because women and children were getting their faces knocked off by sad drunk men with nothing else to do. Prohibition and education worked for building a middleclass in the US. Then the companies left, with exception of giants such as Millikan, who my grandmother worked for and who, from that work, has respiratory issues today. Many ideologies compete, contrast, or enhance each other(there is a dialectic) but power has been pretty damn dominant in structuring our society towards white nationalist narratives.

Let us remember: the south is dying and the only lifeblood for these cities are capitalist(the industrial boom of South Carolina is) and high-income earners. When these groups remove themselves from politcal organizing governemnt only becomes useful for sublimating the rhetoric by liberal and conservative media outlets.

If Nial(Neil) Ferguson(idc) and David Grueber can agree that socialist ideology is far more sanguine to a natural human order, ideology seems a less prevalent impetus to organizing than its pragmatic nature.

I think it’s fair to say the revolution will not be televised, but there are no rules. The most palpable revolutionary force in America is an anti-capitalist, racist, right wing fascism.

To jump the question of rules for radicals, who are the loud minority, how does the silent majority live through ecological collapse? This is that asterisk. It seems we’re losing. We being people. There isn't any uniting principle or goal. It's giving Parable of the Sower.

So what is activism? What can it do? Ride around your city at 3-4am. Join a protest. Get involved in organizing your people. I’m not discounting organizing. But I’d like to forward a more pragmatic mentality inspired by a monologue from The Turin Horse. If everything has been upended and the only real change never happened then where do we go? When can we say we lost? Where should we go after?

June 14, 2022

What Shines

A review of The Temple of the Golden Pavilion.

spoilers ahead

TLDR: Can acts of destruction be virtuous?

The point of this post is to consider how an act of destruction becomes moral. Whether violence is moral is outside the scope. Terrorism as an extension of moral philosophy is outside the scope.

Intro

1950 saw the infamous Kinkaku-Ji destroyed. This had been the second time since some nearly 400 years before, when a civil war broke out, ushering in the warring states period for Japan. Zen monk in training Hayashi Yoken had little documentation regarding his motivation but was said to be a fanatic and a schizophrenic with a persecution complex. The temple, known in English as the Golden Pavilion was reconstructed, packing more gold leaf than before, and remains a popular destination for many to this day. In The Temple of the Golden Pavilion Yukio Mishima re-imagines this boy’s act as that of a troubled adolescent.

Painted image of Kinkaku - ji before it burned down in 1950

Consider the Virtue of Action

The introduction to the book by Nancy Wilson Ross roots psychological trauma as the impetus for Mizoguchi’s troubled relationship with beauty and action. I necessarily agree that an intervention of some kind is preferred when one finds themselves in a sense of “sick consciousness“, but what I reject from Ross is the minimization of Mizoguchi’s reasoning. If Zen is the killing of a cat and the nature of Zen can be the placement of shoes on the head, then Zen seems to be found in the action? Not the reasoning. Mishima thus asks us to consider the effective action Mizoguchi takes when fully disillusioned by the iconography of the temple.

I do not take it that Yukio Mishima imagines Mizoguchi as a psychotic boy lashing out at misplaced impotence or the perceived vanity of the monks. Not to take away from Mizoguchi’s mental troubles, however, I am totally down to say his fixation on the temple is a stand-in for a sense of impotence or a classic psychotic break.

But is Mizoguchi psychotic? Well, potentially. After a fateful encounter with his childhood crush left him speechless and somewhat bumbling, Mizoguhi’s ideology can be clarified by the following:

Day and night I wished for Uiko's death. I wished that the witness of my disgrace would disappear. If only no witnesses remained, my disgrace would be eradicated from the face of the earth. Other people are all witnesses. If no other people exist shame could never be born in the world.

In this formative moment for Mizoguchi his preconception of beauty as imparting a sort of indelible innocence is torn from him, replaced by a deep shame and suspicion. If we are to take the events at face, it would seem his self-consciousness arises from the revelation of his own inaction rather than the imminent rejection of Uiko, who simply happens to be a “witness“ of this shame. I believe the line below is actually unsubtle at intimating the extant of Mizoguchi’s psychological state:

As usual, it occurred to me that words were the only things that could possibly save me from this situation. This was a characteristic misunderstanding on my part. When action was needed, I was always absorbed in words; for words proceeded with such difficulty from my mouth that I was intent on them and forgot all about action. It seemed to me that actions, which are dazzling, varied things, must always be accompanied by equally dazzling and equally varied words

One can ask, under a less pressing situation, in which Mizoguchi does not deal with the suicide of a peer, the death of his father, an inattentive mother, the frivolousness of temple monks, an inner dialogue on the mundanity of beauty, and a speech disability, “would the outcome still happen?“

It may seem unlikely, but I propose morality is not easily gained. Much of this book seems to be a mediation on action and the virtues beauty inhabit as opposed the sick manifestation of a boy

Concerning Morality and Beauty

While reading, I was primed with the notion of this ending with the murder of a sex worker. For what it’s worth, I also took most of the book to initially be a boy dealing with a traumatic kind of impotence and depression. The story of Elliot Rodger was at the top of my mind, I was like “for sure this guy murders a prostitute right?“ However Mizoguchi found the company of women often, and when the time for sex occurred he found himself more fixated with the temple, never once seeing women as the source of his impotence. Let us take a look at pages 203 to 205.

“Thus it was that she unfastened her sash-bustle before my eyes and untied the various cords. Then with a silky shriek, the sash itself came undone, and, released from this constriction, the neck of her kimono opened up. I could vaguely make out the woman's white breasts. Putting her hand into her kimono she scooped out her left breast and held it out to me.

It would be untrue to say that I did not feel dizzy. I looked at her breast. I looked at it with minute care. Yet I remained in the role of witness. That mysterious white point which I had seen in the distance from above the temple gate had not been a material globe of flesh like this. The impression had been fermenting so long within me that the breast which I now saw seemed to be nothing but flesh, nothing but a material object. This flesh did not in itself have the power to appeal or to tempt. Exposed there in front of me, and completely cut off from life, it merely served as a proof of the dreariness of existence.

Still, I do not want to say anything untrue, and there is no doubt that at the sight of her white breast I was overcome by dizziness. The trouble was that I looked too carefully and too completely, so that what I saw went beyond the “stage of being a woman's breast and was gradually transformed into a meaningless fragment.

It was then that the wonder occurred. After undergoing this painful process, the woman's breast finally struck me as beautiful. It became endowed with the sterile and frigid characteristics of beauty and, while the breast remained before me, it slowly shut itself up within the principle of its own self. Just as a rose closes itself up within the essential principle of a rose. Beauty arrives late for me. Other people perceive beauty quickly, and discover beauty and sensual desire at the same moment; for me it always comes far later. Now in an instant the woman's breast regained its connection with the whole, it surmounted the state of being mere flesh and became an unfeeling, immortal substance related to eternity.

I hope that I am making myself understood.

The Golden Temple once more appeared before me. Or rather, I should say that the breast was transformed into the Golden Temple.

I was certainly not intoxicated by my understanding. My understanding was trampled underfoot and scorned; naturally enough, life and sensual desire underwent the same process. But my deep feeling of ecstasy stayed with me and for a long time I sat as though paralyzed opposite the woman's naked breast.

I was sitting there when I met the woman's cold, scornful look. She put her breast back into the kimono. I told her that I must leave. She came to the entrance and closed the door after me noisily.

Until I returned to the temple, I remained in the midst of ecstasy. In my mind's eye I could sec the Golden Temple and the woman's breast coming and going one after the other. I was overcome with an impotent sense of joy.

Yet when the outline of the temple began to emerge through the dark pine forest, which was soughing in the wind, my spirits gradually cooled down, my feeling of impotence become predominant and my intoxication changed into hatred-a hatred for I knew not what.

So once again I have been estranged from life!

I do not see this as a metaphor of misplaced rage at the woman. There is morally bound impotence arising from his relationship with the pavilion. Mizoguchi is not driven by despotism or the lack of mental health care. Neither should we consider him to be fanatical in regards to theology. Mizoguchi is driven to act by a moral duty to his ideas. To not acknowledge the moral impetus of his destructive intent requires us to ignore the allegoric dialogue between Kashiwagi & Mizoguchi at the core of this book.

Nansen Kills the Cat

In a Koen compiled by Zen master Wumen Huikai, the tale of Nansen and Joshu is told. Nansen kills a cat because his students couldn’t answer a question on the nature of Zen. Joshu, having been away, arrives, and is told the news of the cat. He places his sandal on his head and walks out. Nansen responds, noting that if Joshu was there, he would have saved the cat. I do not aspire to attain any notion of a Zen practitioner, but the notion of an individual irrationality in action attributed to Zen has intrigued me since hearing this story.

In describing the Zen of Nansen Kills the Cat, Zen master Roshi Philip Kapleau observes

In Zen, it is said that the highest truth is beyond knowing….True Nature is free from all-knowing and not-knowing. It surpasses all concepts of right and wrong, of this and that — “cat has the Buddha nature,” “the cat doesn’t have the Buddha nature”… “dog has the Buddha nature,” “dog doesn’t have the Buddha nature”… “is the enlightened person subject to the law of cause and effect, or is he not?” In every one of these ideas, we are obscuring the wholeness of our True Nature…. Nansen with one stroke cuts out all of these delusions of the monks. Like a surgeon with a scalpel, he cuts out the cancer of this contentious mind.

There is no such thing as individual knowledge….knowledge is the sea of humanity, the field of humanity, the general condition of human existence

What Mizoguchi does as an act of Zen, is possibly motivated by his liaise with beauty. Let us consider some dialogue between Kishiwagi and Mizoguchi.

Kashiwagi: human beings possess the weapon of knowledge in order to make life bearable. For animals such things are not necessary, as animals don’t need knowledge or anything of the sort to make life bearable. But human beings do need something, and with knowledge they can make the very intolerableness of life a weapon. Though know at the same time, that intolerableness is not reduced in the slightest that’s all there is to it

Mizoguchi : don’t you think there is some other way to bear life

Kashiwagi : no I don’t, apart from that, there’s only madness for death

Mizoguchi : knowledge can never transform the world…what transforms the world is action, there’s nothing else

Kashiwagi : there you go…don’t you see that the beauty of this world which means so much to you craves sleep, and that in order to sleep it must be protected by knowledge. you remember that story of Nansen kills a kitten…the cat in that story was incomparably beautiful. the reason that the priest from the two halls of the temple quarreled about the cat, was that they both wanted to protect the kitten. to look after it, to let it sleep snugly within their own particular cloaks of knowledge. Now father Nansen was a man of action so he went and killed a kitten with his sickle, and had done with it, but when Joshu came along later he removed his shoes and put them on his own head. What Joshu wanted to say was this, that he was fully aware that beauty is a thing which must sleep and which, in sleeping must be protected by knowledge, but there is no such thing as individual knowledge. a particular knowledge belonging to one special person or group. Knowledge is the sea of humanity, the field of humanity the general condition of human existence. I think that is what he wanted to say. Now you want to play the world of Joshu don’t you? Well beauty, beauty that you love so much is an illusion of the remaining part, the excessive part which has been consigned to knowledge. It is an illusion of the other way to bear life, which you mentioned. One could say that, in fact, there is no such thing as beauty. what makes the illusion so strong….is precisely knowledge…….beauty is never a consolation. It may be a woman, it may be one’s wife, but its never a consolation. Yet from marriage between this beautiful thing, which is never a consolation on the one hand, and knowledge on the other, something is born. It is as evanescent as a bubble and utterly hopeless, yet something is born that something is what people call art.

Mizoguchi : Beautiful things…those are now my most deadly enemies

Mizoguchi Destroys the Temple

Mizoguchi is exposed to murder, famine, the death of his father, an absentee mother, and an early childhood mired in ridicule and a sense shame. As his mental state deteriorates, it is not any of these realities that spark the idea to burn down the temple. It is hearing of how the citizens in a tavern view the temple monks. Tax burdens who do little more than chase sex workers. At this moment, Mizoguchi has his mind set on destroying asceticism. Mizoguchi loses any illusion of beauty in the practice of the monks and must destroy that beautiful temple.

Works Cited:

Mishina, Y., 1977. The Temple of the golden pavilion. New York: Knopf.

June 13, 2022

Don't Let the Medium Dictate a Purpose for the Message

Recently I had a conversation that went like this:

Zo: Qwelian, do you think we get AI?

Me: I think it’s a pretty long shot. Maybe we get legit humanlike virtual AI assistants at best.

Zo: Yeah, we just gotta prevent the AI revolt if they become self-aware. Engineering class hierarchies into AI could be a solution.

Me: Bruh why are we projecting class distinctions onto code?

Zo: Oh, so you mean to tell me AI cant be conscious? Qwelian, isn’t your conscious processes analogous to an algorithm?

Me: First, the Animatrix. Robo revolution is assured if we go that way. Plus, WTF are we talking about? Embodied agents with freedom or socially constructed agents. I find it hard to believe that we can outsmart machines anyway.

Zo: Yeah, so how about those hierarchies?

We really arguing whether the future of life, digital enitities, will organize against us.

Make it Make Sense

Recently I have been thinking about four pieces of writing. The first is Marshal McCluhan’s The Medium is the Message. McCluhan suggests the following: New technology can capture fully how we understand, incorporate, and act on information. Without social media or the internet(the medium), how we talk about creating communities with access to information looks different(the message). This leads to my first question: How are contemporary technologies wholly affecting the way we cognize the world?

Simulacra and Simulacrum by Jean Baudrillard is the second. Initially, I read the first couple of pages, skipped through, and said to myself, “Hmmm, there isn’t much here, he's really just on a soapbox screaming the media ruined everything. Very much Howard Beale peak messianic media personality. I should just read Borges. But Baudrillard uses a metaphor at the beginning of the book(taken from Borges), essentially saying the map of a nation can become more expansive than the nation itself.

If McCluhan ‘s notion of an idea means the superimposition of an idea’s original context with what can be derived from the idea, then what comes next is the perpetuation of the necessity of the idea, becoming future propaganda for itself through whatever reason deemed necessary. This review of Simulacra and Simulacrum has a nice summary.

What drives the mapping of lived experience onto technology?


Apparently hierchies can be expressed through NFTs?. Seriously who is going out making slave tokens...


Why John, WHY?

The third is Semantic Engines by John Hagueland. Hagueland’s piece questions whether cognition can arise from a semantic understanding of mental states. He applies computational theory to minds using Turing machines and games. In his view, mental awareness is little more than symbol manipulation. This approach melds the mentalist belief in the phenomenon of consciousness with the behaviouralist approach of empirically developed experiments to gauge cognition. I like the essay because why not abstract consciousness to processes akin to formal methods. It may totally be the case that human-level thought is just like really really complex symbol manipulation. All Symbols al the way down. I mean a really cool robot might convince me of that 🤷🏿‍♂️. What gives serious pause, to me, is to not treat simulations as a form of insight into cognition as opposed to the thing consciousness is. It’s like taking a turtle out and saying it’s a duck. Make it make sense. The movie Free Guy is fantastic but it would be hella sus if, in that world, we thought we discovered what cognition is for humans instead of a great simulation of cognitive capacity. I am all aboard(motherboard pun 😭) for cognitive beings. Yet, this is precisely what Hagueland and those of his brand of brain as CPU believers like Daniel Dennet do. They take a strong AI stance by saying thought is digital and the brain, pfft, who cares, it’s just wetware.

p.s. I mean the latest AI sparking GAI discussion is just so so at the task given to it. Oh now that it can take multiple input types its gEnERaL Ai???

ooooo

Fuck!

nooo

In Can Computers Think John Searle defines the limits of viewing a syntactically structured system as containing meaning. As he puts it(pg 674 of linked PDF):

  1. Brains cause minds.
  2. Syntax is not sufficient for semantics.
  3. Computer programs are entirely defined by their formal, or syntactical, structure
  4. Minds have mental contents; specifically, they have semantic contents.

which leads to a few conclusions:

  • Computer programs cannot substitute the mind

  • Our awareness and reason cannot be simple as running a program and iterpretting symbols

  • anything that causes the mind would have causal powers equal to that of the brain.

  • Any artifact humans may create that has mental states similar to that of humans would not be a simple program.

Searle asks a commonsense yet not so apparently so question: “Why do people think computers have thought or feel emotion?” Which brings us back to the conversation that started all of this. Why create an ML/AI caste system?

Should we fear the cognitive capacity of Turing machines? If we get a tidy reproduction of human mental capacity via cyborgs, clones, or automata, that’s cool; then what? Pick your flavor of dystopic near-metal cognitive driving: Serial Experiments Lain? The Matrix? Ex-Machina? Ghost in the Shell, Robot Carnival, and Do Androids Dream of Sheep might reveal how we confront the phenomenon of relegating complex thoughts and emotions to humanity. But rarely do we envision a future where technology does more than mirror our current capacities. Maybe machines will take over, but technology is a medium through which we express ideas. We don’t need to create docile slaves

To reiterate some questions I asked that are too onerous to find landing here, I ask:

What flips the medium of technology to drive a hyperreal imitation of references to itself, such that the reference loses context to what technology itself abstracts?

How are contemporary technologies wholly affecting the way we cognize the world?

What drives the mapping of lived experience onto technology?

April 11, 2022

Notes on Being Black and 100 Amazing Facts About the Negro

100 Amazing Facts about the Negro with Complete Proof: A Short Cut to the World History of the Negro

There are multiple states of experience in the communities of Americana. Most probably due to extractive, globally expansive policies of the colonial enterprise. Now, this isn’t to say that ethnic/cultural diversity isn’t a thing and always will be a thing, but I’m just saying, it’s not why I’m here in America. As I read through How Nations Fail the focus on institutional practices and the will of the state to exist, how the state validates its undertakings, promotes innovation, and how those institutions change culturally have become more prescient for me in a time where ‘antiracism‘ is meaningful in the practice of institution, uhh being and doing.

The search for meaning in my specifically black identity is a question I grapple with. My identity is partially a tale of my temporal essence, or, to be less vague, how I am perceived socially in whatever context and how I experience my social caste maybe, status, maybe identity through the historical impact of ideas and institutions. Afropessimissm is a bit too uhh pessimistic in forwarding a theory of the end of racialized identities but I like the vibe. We should probably stop racializing each other.

Every now and then I go through 100 Amazing Facts About the Negro to make sure I am not crazy for believing in the struggle for the black folk after rampant colonial racist ethnography became the norm. Post-modernity suggests identities are self-asserted, performative sociality, with the state as a vehicle for the people to innovate, grow wealth, and support themselves through tacitly inclusive or uninclusive institutions. I find this book to be the quintessence of that because history has a lot of black people in it. But there was and still is a need to remind people of that. What is that need?

When racial tensions arise to become a distraction from or scapegoat for more intrinsic issues in Americana J.A. Rogers reminds us that black people have

*always* been great, or at least treated as great threats.

This leads me to my favorite facts currently:

  • Fact 8: Was Beethoven black? I am not convinced, but Rogers cites relevant sources on the topic. We also get this ML-generated rendition of Beethoven that provides African polyrhythms for his piano sonatas. I am here for it.

  • Fact 41: Poor white people in Maryland would be forced into slavery after marriage to enslaved Africans because of a law(1664) that stated marriage to a slave meant you served that slave’s master. Meant to de-incentivize early race-mixing, the law also removed the ambiguity of slave status for mixed-race children, as well as baptized slaves. A follow-up to this law is one preventing slave owners from forcing poor white *women* to marry male slaves(1681), exposing deep roots of gendered miscegenation.

  • Fact 50: The psalms of the bible may be in the lineage of those in writings from the Egyptian philosopher, Akhenaten, who promoted monotheism and what it meant to be moral. Nice to have this partially reinforced by a podcast I listen to on the history of philosophy. From the series on Africana Philosophy.

Not all of his facts can be supported, or should be considered tasteful; boasting about black male fitness over white counterparts for war is questionable, and while I *love* black washing history, plenty of his examples are of dubious sources. Yet, 100 AFATN reminds me that the history of my people is a long history that has been influential far before Atlantic routes of bondage had been established. We should hold the history close.

Peace

April 11, 2022

a gift

*all images are taken from Attack on Titan chapter 131, written and illustrated by Hajime Iseyama. none of the media is owned by me*

Attack on Titan is one of the best manga to come out in recent memory but it is bogged down by a convoluted plot, contradictory exposition of its themes, questionable character development, and a random twist that does nothing to diminish or enhance the plot. It just kinda happens. AoT at its core, however effectively examines dread, uncertainty, war, and freedom through its primary character Eren Jaeger. I hope that readers question how capable we are of creating a positive world for future generations.

Written here is a review by Anilist user LN03. The ad hominem thrown at Hajime Isayama is unpleasing, but I found myself agreeing with their criticism of Historia’s role in the plot, Eren’s contradictory behavior, Mikasa’s lack of growth, what Ymir’s love for King Fritz meant, why war criminals are just left to chill, how Zeke died, why Reiner kept getting beat(all Ls), and why Eren felt his path appropriate. What I find most interesting is that anyone could view the ending of this series hopeful. For many, this story is flawed because there is no way that the protagonist can succeed in creating this happy ending Isayama has been building. I don tbeleive we are suppose to find Eren's actions reasonable though. Nor would a happy outcome make sense given the will of Ymir.

Justice.... Nah. Just Us

Attack on Titan’s end hinges on its uncertainty. For me, AoT is a story of dread, perhaps freedom. An interesting question I found asking myself concerning justice was if people who have committed genocide lead Earth’s last people? I say they get tossed in jail at least. But we have to acknowledge to the world of possibility Eren provided in ridding the world of Titan powers, allegedly. do not like the ending, personally, because seeing a kid too stupid to be safe get powers and destroy the world for vengeance is heartbreaking. The rumbling would always happen at some point because an island of GIGANTIC TRANSFORMING HUMANS THAT MAY GO MINDLESS AND START EATING HUMANS ARE DANGEROUS ESPECIALLY WHEN THEY HAVE A BUILT-IN MECHANISM THAT SAYS THE BIGGEST VERSIONS OF THOSE MONSTERS WILL LITERALLY STOMP THE REST OF THE WORLD TO DEATH IF THEY ARE INVADED. Couldnt we do away with them?

delusional here we find children in a similar predicament aas or protganist doing what they feel they must

If we know Eren then we know he would destroy the world to appease his sense of justice. Eren was always obsessed with joining the military and would chide Hannes for relaxing on his job. As a child, Eren thought himself bold enough to save Mikasa and did not hesitate to ruse the captors so he could strike but he was not built like an Ackerman so he got beat up. This marks the beginning of the pattern of Mikasa saving Eren because he is a sigma idiot who will die before saving those he cares for.

Empathy

From the beginning, I never understood why this nationalist asshole who is too self centered to admit his own weakness was centered as the main protagonist. For me, there was no way this story could have a peaceful ending. Eren is so cowardly that he’d rather die than believe in himself (plea to Historia Underground), and would rather destroy the world than talk to others. Shit, if Eren didn’t get humbled during the training corps arc any attempt at character growth would be questionable. Before everything, Eren was filled with rage at the hapless despair Paradis island faced. Eren is the violent impetuous child he always was. Willing to risk his life without a concept of the value of life. Eran’s sense of dread leading to the underground diamond cavern superficially stems from jealousy and a sense of powerlessness. I could never love nor unconditionally champion Eren. What I regret is not empathizing with Eren’s despair. His sense of being powerless child in the face of atrocity.

Eren apologizing Eren smashing

While going through the communiies outrage at AoT’s ending, I begin to understand something about why the story resonates. It is only when one believes a better outcome can be achieved that one might find the strength to feel pity for themselves and others. I thought there were many ways AoT could have ended better. But Eren never saw a world where peace was meant for him. Paradis was never liberated by civil war. There was no non-violent protest that challenged genocide or prejudice in Marley. Eren thought Paradis to be the only refuge in the world. The outrage of knowing the world outside stood by and actively participated in the creation of his grief entrenched the despair he had felt. Genocide by Paradis Titans or by Marley, sterilized by Zeke, there are no happy endings. At best, the titan powers can be done away with. Alledgedly. This was the tragic form of Iseyama’s narrative.

Life is complicated. We collectively make decisions every day that could impact the lives of every living creature on this planet. We are in the middle of a climate crisis that we have not yet collectively accepted, but is happening slowly. We can destroy our planet at any time with nuclear weapons. We can create our rumbling. We will eventually. How then, can we know what good needs to be done? How do we preserve the future? Who are we to do so? What should be preserved? What is the right way to live in the face of extinction? Why can’t a unifying, unselfish love be present in these times? What do we want for the future?

The gift Isayama provides for us is the deep-seated hope all characters share for a safer world. A hope that persists past the rumbling.

April 8, 2022

Making Blockbuster Movies that are Ideologically Meaningful Yet Unpolished in Order to Push Your View of the World Isn't Really Enjoyable

Nolan has crafted an original story, with an incredibly relevant narrative, As we move through our climate crisis, one must ask will the future forgive us? Nolan explores this dichotomy expertly, thematically. But Tenet has no character, unlike Twelve Monkeys. And It’s not Primer. The general story felt predictable because, uh, I don’t know, Back to the Future Part II. Like as soon they started fighting in the clear port I’m like oh, the bad guy is Biff and the protagonist is going back in time to stop him.

Now I bought into the whole “it is time travel don’t worry about understanding it” thing. Turns out there is a lot of exposition about time travel though….. Why set up this air of fate, when THE WAY IT IS PRESENTED IS COMPLEX. This invalidates the scene with the woman who shows him inverted materials and makes the exposition on the time shit underwhelming. Nolan won’t expand but many fanboys will because he leaves room for his films to “explore” through his consistent themes. I’m sure I missed something. But who cares, the film is rated above average, not enduring, but not terrible.

I am reminded of the twist in Memento. The main character, the man with no permanent sense of self seems delusional at the end because the film grows from a time-neutral perspective. You would think the protag comes into contact with this, but no. Nolan does not follow through on this neutrality towards the protag. The protag succeeds and he is now the leader of TENET? I do not know. I can appreciate the will to “believe“ in a better future, but who cares. Who are you bro? It’s a complete 180 from the characterization we see in Memento, leading me to ask if this is growth or regression. I am of the mind that Nolan does not want to make films, but I will explore that later.

Normally Nolan sacrifices his cool themes and character growth for his ideas. This was the same but different. I will probably never watch Intersteller again, but the scene where Matthew Mc-caw-ne-hey is pleading for his daughter is emotional. None of the scenes in this movie are. Pattison has the most interesting character on film, but he is not our main, and Pattison just kind of comes out of nowhere.

The main character’s development is in contention with the main theme of the movie, which makes it hard to analyze. On one hand, time is unexplainable, on the other “here’s” your protagonist crushing that setup with the power of friendship. Time can be changed yada yada. Not sure if Nolan is trolling or if this is to be taken seriously. We just don’t get the feeling of legit stakes being involved you get when watching The Saint and as a bad film, Next has a better “future shit needs to be stopped” plot(both written by Jonathan Hensleigh). I think Tenet is enjoyable, but it does not have flying hats, men with metal jaws, women killed by being covered in gold, sharks with lasers, etc. No one in this film matters but the tone is so serious. Nolan sacrifices character development and exposition for the ideal of what he wants to portray. Also, when did society figure out time travel? Before during or after the fall. Who cares. Remember Interstellar. The movie where we could go to a black hole in spaceships with lego robots but not fix some esoteric catastrophe at home. I would just like Nolan films to flow. They don’t. He makes the prettiest most idealistic version of a B-list action film and it seems wasteful.

Now, everything considered, I thought it was going well because I expect Nolan to be inconsistent in execution while carrying his themes in his movies.

That is until I looked up the 2-hour mark and saw I had another 30 mins to go. It took a week to build a passing curiosity about what the ending may be.

The last action scene is a raid on the time compound with magic metals with what is described as a tactical time pincer attack where one group goes back in time and the other remains on the main timeline to fight the bad guys. But what it looked like to me was a bunch of idiots walking into a kill zone. We only see about 6-9 bad guys in this scene though….A lot of shooting. A lot of explosions. But nothing was shot. Worse than the Dark Knight Rises street fight scene. (Like bruh, when did charging a bunch of people with tanks and automatic weapons become a successful strategy. Mute the sound and watch it again. It is silly).

Now thematically, Neil going back in time to get the door open, dying in the process, and saving the Protagonist is awesome. It’s cool to think about what if he invented time travel, came back in time, ended his father, blah blah blah but who cares. Nolan certainly does not.

Nolan Reheats his Meals

This movie has allowed me to process my animosity for Nolan more cogently. All of his films deal with characters who question their role in the narratives taking shape around them. Let’s consider

Memento - character rather live a lie than face his wife’s death. Memory loss is the mechanism behind this. The first and second watches are priceless. But this character sets the tone for his later protagonist. Only he has a bigger budget to fuck around with.

Batman series - Rather be a villain than deal with the citys’ crime. And will blackmail his employees into not revealing the fact that Bruce Wayne spends company money on his escapades. I might even argue that Batman is not a hero in the last 2 films. The dude is never in Gotham just protecting people from crime. It is almost like Nolan has to force Batman into not being a hero so he can fulfill his plot wherein…IDK...Batman quits…who cares.

Inception - This film is complete, but I have chosen to say fuck you Nolan. The end means the film’s events matter for their character or they do not. If I wanted a three-hour choose your adventure I would play Elder Scrolls. I start not to care about the plot as it drags on. And by the time the van starts flipping over, I just want to see the end. The better story is about the son transcending the father. Dreams are the mechanism, and we see Nolan at his most Meta. Dreams == Movies, Real Plot==Scarecrow face

Interstellar - Love won’t stop a global crisis, but it will get you out of black holes and propel you through space. This may be him trying to tell a direct story, which I can not see him being interested in. Let’s just ignore plot holes on this one. Black holes are his mechanism for a commentary on love

Tenet - Back to the future, with a less coherent time travel angle. Not sure if he is saying save the cheerleader, save the world. Cause it seems the protag is someone who would stop that. I am not sure. It’s at least save the boy saves the day. But it too feels dreamy, kinda like Inception. I’m way more interested in Neil. But who cares. The story is not as well developed as Inception. Mechanisms are time and love and fate and a nameless black guy.

I think Nolan cares more about the art than what he sells. I do not think that he is shallow. But it seems Nolan would rather craft billion-dollar movies on love, subjectivity, purpose, and science than million-dollar movies exploring these themes. Marvel is a top 5 grosser but it ain’t even on the plane of serious films. Money doesn’t mean shit. I think Inception and Memento are the only Nolan films that will stand the test of time. At the end of the day, Nolan's films are great, but he is still only Kubricesque. He can make a great film, but he can’t make 2001 A Space Odyssey(legitimizes the sci-fi genre), Full Metal Jacket(contemplative commentary on war and peace), or The Shining(arguably top 15 on any list). He is incapable of finding the range in his medium, only sticking to smart and sexy because he uses the screen to push his ideas instead of developing the characters in his movies to a satisfying end. Quentin Tarantino has mastered this by not making smart and sexy movies. He makes derivatives of the films he loves with all the fanfare of Nolan. We always want a Tarantino film because they are always good movies. It thus seems kind of wasteful if Nolan’s films are less enjoyable than the themes he presents. What impact will Nolan have on the field other than making good shit to look at in IMAX and a deep ponderance of our role in the narrative we tell ourselves?

To give credit to Nolan however, there may be another way of writing this that critiques the subplots of the movies he develops. The Prestige also looks wonderful. I believe all his films have a wealth of meaning. He somehow manages to combine arthouse surrealism with blockbuster moviemaking. I might even go so far as saying Nolan has the most unique voice amongst big-budget moviemakers ever. But it all feels kinda pointless if the movie in itself is average.

Get your money though king…

April 14, 2021

Black Rednecks and White Liberals

Part1

Cracker history or redneck history stemming from Scots-Irish immigrants rubbed off on southern blacks so much so that when the great migration occured the blacks brought that redneck culture to the north. No coincidence that the KKK might have emerged out of that ruckus, right?

Part 2

Middleman minorities earn the eyre of the societies they integrate into because of their economic success.

Part3

Slavery has some bad effects and some good effects but everyone was doing it. There is no need to compare the implementation because all slavery was the same.

Part 4

Really tho, middleman minorities are so successful that Germans turned to persecute them out of spite clearly. Most didn't even care about Jews being Jews...

Part 5

Blacks can learn at school and do but those dancing kappas obsessed with looking good ruined the colleges. WEB Dubois and Booker T would be ashamed.

Part 6

Seriously. Every culture commits mass genocide or commits some war atrocitiy. Just because some Australian lady feels bad about genocide doesn't mean that it's their fault. There aren't any indigenous people around to tell you how they feel anyway so be objective when you speak about history.

It was some of the wonky idiosyncrasies of the main tenants featured in each essay that causes me worry. Like bro what culture was in place such that the Holocaust could happen. That some of the largest social ills in the Western hemisphere of the last 200 years be committed exclusively against brown people and those of minority background deserve its own appreciation. I am not calling for relativsim or ignoring genocide elsewhere. I just have a feeling that slavery in Rome and slavery in China were two very different cultural phenomenons. It feels like anti-sematism is a feature not a bug. I am asked not to consider the cultural significance of oppression, but to consider the cultural significance of the population slaves adapted thier culture from. Ok. Survival tech is cool. I just have a strong feeling the legislation that intensified violence against blacks had something to do with this a priori. Or maybe blacks just needed to chill and wait for America to give them their rights. Like I could not understand the civil rights period if I read only Thomas Sowell.

But I do think he provides the strongest counter argument against systematic oppression or some innate inferiotiority being the main foil to black progress. We are in many respects responsible for how we are viewed in this society. I can't say I beleive in all the shit our culture gets up to. Sowell asks us to consider very real alternatives to the slave oppression narrative. Maybe instead of adopting Irish culture we should have adopted northern culture or perhaps Jewish culture or immigrant culture. Maybe that would have prevented Jim Crow lol(editing in 2025 maybe that would have prevented project 2025 lol). That thinking did seem to get HBCU's off the ground. My liberal gripe is that Thomas Sowell asks us to be responsible with how we attribute race to our cultural heritage while offering no insight into how we prevent the genociding of the minorites. We should care about that. I am confused.

March 25, 2021

Using GCP, FastAPI, Docker, and Huggingface to Deploy SOTA Language Models

I have found using more than 2 models is too large for most deployed containers. If you know a way around this let me know.

Initial Set Up

This stack will use FastAPI to serve an endpoint to our model. FastAPI requires uvicorn for serving, and pydantic to handle typing of the request messages. The Huggingface Transformers library specializes in bundling state of the art NLP models in a Python library that can be fine-tuned for many NLP tasks like Google's BERT model for named entity recognition or the OpenAI GPT2 model for text generation.

Using your preferred package manager, install:

As the packages install:

  1. Create a folder named app
  2. Add files nlp.py and main.py to it
  3. In the top-level directory, add Dockerfile and docker-compose.yml

After installing packages, create a requirements folder and add requirements.txt:

Since I used pipenv to manage the python environment, I had to run:


pipenv run pip freeze > requirements/requirements.txt

You will need this folder later for building the Docker container. While we are on the topic, be sure you have installed docker and check to be sure the following are installed.

The project structure should look like this:

app/

    main.py

    nlp.py

requirements/

    requirements.txt

docker-compose.yml

Dockerfile

Pipfile

NLP

Hugging Face makes it really easy to implement and serve sota transformer models. Using their transformers library, we will implement an API capable of text generation and sentiment analysis. This code has been ripped straight from the site, so I will not be deep diving the transformer architecture in this article for times sake. This also means means our models are not fine tuned for a specific task. Please see my next article on fine tuning and deploying conversational agents in the future. With that disclaimer out of the way, lets look at a snippet of the code responsible for our NLP task. Code Snippet


from transformers import (
    pipeline,
    GPT2LMHeadModel,
    GPT2Tokenizer
)

class NLP:
    def __init__(self):
        self.gen_model = GPT2LMHeadModel.from_pretrained('gpt2')
        self.gen_tokenizer = GPT2Tokenizer.from_pretrained('gpt2')

    def generate(self, prompt="The epistemelogical limit"):
        inputs = self.gen_tokenizer.encode(
            prompt,
            add_special_tokens=False,
            return_tensors="pt"
        )

        prompt_length = len(self.gen_tokenizer.decode(
            inputs[0],
            skip_special_tokens=True,
            clean_up_tokenization_spaces=True
        ))

        outputs = self.gen_model.generate(
            inputs,
            max_length=200,
            do_sample=True,
            top_p=0.95,
            top_k=60
        )

        generated = prompt + self.gen_tokenizer.decode(outputs[0])[prompt_length:]

        return generated

    def sentiments(self, text: str):
        nlp = pipeline("sentiment-analysis")
        result = nlp(text)[0]
        return f"label: {result['label']}, with score: {round(result['score'], 4)}"

This is a very simple class that abstracts the code for text gen and sentiment analysis. the prompt is tokenized, the length of the encoded sequence is captured, and output is generated. We then receive the decoded output and return it as the generated text. The text returned for generate() will look something like:

The epistemological limit is very well understood if we accept the notion that all things are equally good. This is not merely an axiom, but an axiomatical reality of propositions, including the notion that the things on the left of the triangle do not constitute a thing, such that that thing can neither be said to exist nor to exist as a thing apart from something on the right of that triangle, nor to be a thing apart from something else on the left of that triangle. Thus if we suppose that each thing must lie on the line of a triangle, as there is a line across this triangle, then each thing cannot lie on that line; but only as there are points beyond this point, so that nothing has a right angle to the triangle. Hence the proposition “the things on the right of a triangle do not constitute a thing” is a fact, which presupposes a fact, which can be the proposition that no thing exists. On the other hand, suppose that if

Godel would be proud!

Sentiment analysis is easier due to the pipeline huggingface provides. Simply pass in text to the pipeline and return it.

nlp = NLP()
print(nlp.sentiments("A bee sting is not cool"))

# Output: 'label: NEGATIVE, with score: 0.9998'

API using FastAPI

FastAPI is one of the fastest API frameworks to build and serve API request in python. It can be scaled and deployed on a docker image they provide or you can create your own from a python image. If you have ever written a Flask API then this should not be difficult at all. I advise going through the FastAPI documentation for more info on how to extend functionality of your API.

Our server will look like this:

from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from pydantic import BaseModel
from app.nlp import NLP

class Message(BaseModel):
    input: str
    output: str = None

app = FastAPI()

nlp = NLP()

origins = [
    "http://localhost",
    "http://localhost:3000",
    "http://127.0.0.1:3000"
]

app.add_middleware(
    CORSMiddleware,
    allow_origins=origins,
    allow_credentials=True,
    allow_methods=["POST"],
    allow_headers=["*"],

)

@app.post("/generative/")
async def generate(message: Message):
    message.output = nlp.generate(prompt=message.input)
    return {"output": message.output}

@app.post("/sentiment/")
async def sentiment_analysis(message: Message):
    message.output = str(nlp.sentiments(message.input))
    return {"output": message.output}

The API has four sections. The first part is setting up a pydantic object to handle typing for request messages. This means we get input validation and clear error messages for the wrong input. You should only be handling strings so this is perfect. We then create an instance of the endpoint and the NLP class. Next, set up the request origin URLs that you want your app to communicate with. If you do not have dedicated origin addresses, the code will still run, but anyone can access your API so be careful. After that, we set up the middleware to control the origins, request methods, headers, and cookies. I have taken most of the code from FastAPI but it is extensible to your particular security needs. The last part contains two async post request methods that handle the calls to the API and return the generated text or sentiment analysis.

To test the API:

uvicorn app.main:app --reload

Visit http://127.0.0.1:8001/docs to try out the API. FastAPI Response

Containerization

Remember that Dockerfile file we created? It’s finally time to edit that. The container I made uses a python:3.7 image. You are free to tweak this to fit your python image preference.

FROM python:3.7
COPY ./requirements/requirements.txt ./requirements/requirements.txt
RUN pip3 install -r requirements/requirements.txt
COPY ./app /app
RUN useradd -m myuser
USER myuser
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8080"]

The container will copy the requirements to the container, install them, copy over the files from the app directory, create a user (not necessary), and run the API on the container. Yes it is that simple. With regular docker commands we have to stop the container, rebuild the image, and start the container each time. To avoid this, add the following to your docker-compose.yml. Note that your container name can be whatever you want.

version: "3"

services:
  chatsume:
    build: .
    container_name: "chsme"
    ports:
      - "8000:8080"
    volumes:
      - ./app/:/app

Build and run:

This allows us to rebuild the image and container and spin it up in one line: docker-compose build docker-compose up -d

Google Cloud Platform Deployment

After setting up the gcloud SDK you will be able to push docker images to your GCP project. The image will be pushed to the Google Container Registry in your project dashboard. To do so, we’ll tag our image with the gcloud region you want it stored in. For this example, the Docker image will be named nlp_api and the GCP project is fast_hug. The image will then be tagged as the latest one, which is great for keeping up with multiple pushes to your Google Container Registry Instance.

docker tag nlp_api gcr.io/fast_hug/nlp_api:latest

Push to Google Container Registry:

docker push gcr.io/fast_hug/nlp_api:latest

Cloud Run Deployment

  1. Navigate to Google Container Registry
  2. Find your latest image
  3. Click Deploy
  4. Select Deploy to Cloud Run
  5. Allow unauthenticated request (if you want a publically consumable API)
  6. Click next then advance settings.
  7. Set container port to 8080 (or whatever port value you mapped in the docker-compose yml)
  8. Set memory to 4GB
  9. Click Create

Success!!!! You have now set up and deployed a state of the art NLP model.

Conclusion

This post demonstrates how to use state-of-the-art NLP models from Huggingface to power a fast, scalable API. Containerization enables distributed deployment across various services and easy local development. In the future I will try deploying larger models for higher accuracy, at least until GPT3 is publically consumable. For now, you have all the tools needed to rapidly scale a service backed by the latest in available NLP tooling.

January 25, 2021

A Modern Full Stack REST Application

Plaid is a popular API that exposes a user's banking information through REST endpoints. We will make use of their service to create a REST API to create authorization information. We will then create a React application that consumes the API to create auth tokens for a user. This tutorial assumes familiarity with React and full-stack development. The repo for this can be found here:

A quickstart for setting up Plaid server and React client - https://github.com/qweliant/BetterPlaidQuickstart

Getting Started with Plaid API Keys

To get started, we need to head over to Plaid for our API keys.

plaid greeting

Navigate to the Settings tab and click Keys to view your API keys.

plaid secrets

Creds from Plaid

We will use the sandbox environment, which uses a different key for testing than development. Notice on the left sidebar a tab that says API. Click on that and you will see the section about Plaid's redirect URI. Click on Add New URI and add http://localhost:80 and http://localhost:3000. This will control where the redirect after linking happens. If you click on the Test in Sandbox button seen on the landing page, you will be taken to a page showing the test user credentials.

Quickstart repos exist for multiple languages. You can use your language of choice for this project since the client is backend agnostic.

Backend Setup

We won't necessarily run the exact setup they have, but next, we will walk through setting up the backend via the Go Not So Quickstart Repo.

1. Create Project and Clone Repository

git clone https://github.com/plaid/quickstart.git

2. Clean Up Repository

Delete the Makefile, README, and every folder except the go one.

Docker Configuration

These come preconfigured with a Dockerfile to make deployment easy. We won't be covering deployment of Docker containers, but we will be spinning them up using Docker for Desktop. If you need to install, check out Docker for installation instructions per your OS. This will be a pretty simple docker set up that is noob friendly, so you should be able to understand the basics following along.

Edit docker-compose.yml

version: "3.4"

services:
  go:
    build:
      context: .
      dockerfile: ./go/Dockerfile
    ports:
      - "8000:8000"
    env_file:
      - .env

Build and Run

Running:

docker-compose up -d --build

will build the image and start a container. If we look at the Dockerfile we can see how our application is being built. The go version is specified for the official go image. A directory is then created that we copy everything into. After changing the root directory to the go folder, we get the required packages and build the binary. Next we pull the image that our binary will run on, copy the binary into the image, and expose the app via port 8000. By the way, you should delete the lines that copy html and static info over. Our Dockerfile should look similar to this

Go Dockerfile

FROM golang:1.12 AS build
WORKDIR /opt/src
COPY . .
WORKDIR /opt/src/go
RUN go get -d -v ./...
RUN go build -o quickstart

FROM gcr.io/distroless/base-debian10
COPY --from=build /opt/src/go/quickstart /
EXPOSE 8000
ENTRYPOINT ["/quickstart"]

Environment Configuration

If you ran the above docker-compose command you should expect to see warnings about your env variables or errors if you have not already deleted the html and static copy. Lets create an .env file in the same folder as the docker-compose file. This file will define your plaid credentials. The result should be something like:

# Get your Plaid API keys from the dashboard: https://dashboard.plaid.com/account/keys
PLAID_CLIENT_ID=CLIENT_ID
PLAID_SECRET=SANDBOX_SECRET
PLAID_ENV=sandbox
PLAID_PRODUCTS=transactions
PLAID_COUNTRY_CODES=US,CA
PLAID_REDIRECT_URI=http://localhost:80

Server Configuration

The last thing we should do before moving on to the frontend is edit some portions of the code in server.go. This is because the quickstart repo does not behave as one would expect. This may be do to my own ignorance but following the steps in the official repo lead to an environment error.

Attaching to quickstart_go_1go_1 | Error loading .env file. Did you copy .env.example to .env and fill it out?

Edit the server.go file to look like this:

var (
    PLAID_CLIENT_ID = os.Getenv("PLAID_CLIENT_ID")
    PLAID_SECRET = os.Getenv("PLAID_SECRET")
    PLAID_ENV = os.Getenv("PLAID_ENV")
    PLAID_PRODUCTS = os.Getenv("PLAID_PRODUCTS")
    PLAID_COUNTRY_CODES = os.Getenv("PLAID_COUNTRY_CODES")
    PLAID_REDIRECT_URI = os.Getenv("PLAID_REDIRECT_URI")
    APP_PORT = os.Getenv("APP_PORT")
)

var environments = map[string]plaid.Environment{
    "sandbox": plaid.Sandbox,
    "development": plaid.Development,
    "production": plaid.Production,
}

func init() {
  func main() { r := gin.Default() r.POST("/api/info", info)
}

Running the docker-compose command again will start the API. Now is a good time to step away for water or a quick walk. Next we will walk through our react setup. Our penultimate creation will result in a button that performs Oauth for thousands of bank accounts.

Frontend Setup

Create React App

Alright, we’re back, refreshed, hydrated, and ready for the front end. Start the app by running npx create-react-app plaid in the parent directory our go folder is in

npx create-react-app plaid

We’ll start by getting the Dockerfile set up for the frontend and adding the client service to our docker compose file. Lets start the latter part by opening the docker-compose file again. To add a service for the client, simply add it after the go section. The file will change to look something like this:

version: "3.8"

services:
  go:
    env_file:
      - .env
    build:
      context: .
      dockerfile: ./go/Dockerfile
    ports:
      - "8000:8000"
    restart: on-failure

  client:
    stdin_open: true
    env_file:
      - .env
    build:
      context: .
      dockerfile: ./plaid/Dockerfile
    ports:
      - 80:80
    restart: on-failure

React Dockerfile

Next we wanna add a Dockerfile to the plaid directory. In it we define steps for building the production react app and placing it on an nginx webserver. The Dockerfile for this will be:

# STAGE 1 - build the react app
FROM node:alpine as build
WORKDIR /app
COPY ./package.json /app/
RUN yarn --silent
COPY . /app
RUN yarn build

# STAGE 2 - build the final image using a nginx web server
FROM nginx:alpine
COPY --from=build /app/build /usr/share/nginx/html
RUN rm /etc/nginx/conf.d/default.conf
COPY nginx/nginx.conf /etc/nginx/conf.d
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

Nginx Configuration

Next, we need to create a folder for nginx that configures the server. Name the folder nginx and add a a file named conf.d. This configures our server to serve the static build(html, js, cs, etc) on port 80 in the container.

Create nginx/nginx.conf:

server {
    listen 80;
    location / {
        root /usr/share/nginx/html;
        index index.html index.htm;
        try_files $uri $uri/ /index.html;
    }
    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
        root /usr/share/nginx/html;
    }
}

Try running docker-compose up -d --build now to see if the hello world react app is being hosted on port 80. Something to note is the port our app is served on. Since the redirect uri is needed for browser navigation after login, you will need to resolve the uri for dev vs container environments. That may be making a separate docker-compose and Dockerfile setup, or by changing the uri in the env from 80 to 3000. I will leave it to you

Install Dependencies

We now need to add axios and the react-plaid library to handle state and client/server communication. Make sure you are in the plaid directory created and run:

yarn add axios react-plaid-link

Create Link.js

Let’s now open the src folder and add a file named Link.js. Here is where the logic for making the link will be created. The link process in the react plaid hooks library makes it pretty easy to perform auth. With it, we will call /api/create_link_token to get a link token from Plaid. This will initialize the Plaid auth link flow for a users bank account. If the user successfully links, an access token will be generated. The access token needs to be persisted permanently in your DB of choice for access to different Plaid endpoints. For now it is stored as a value on the server. Copy the code below to your Link.js file

import React, { useState, useCallback, useEffect } from "react";
import { usePlaidLink } from "react-plaid-link";
import axios from "axios";
import qs from "qs";

const tokenURL = "http://localhost:8000/api/create_link_token";
const sendTokenURL = "http://localhost:8000/api/set_access_token";

const Link = () => {
  const [data, setData] = useState("");

  const fetchToken = useCallback(async () => {
    const config = {
      method: "post",
      url: tokenURL,
    };
    const res = await axios(config);
    console.log(res);
    setData(res.data.link_token);
  }, []);

  useEffect(() => {
    fetchToken();
  }, [fetchToken]);

  const onSuccess = useCallback(async (token, metadata) => {
    const config = {
      method: "post",
      url: sendTokenURL,
      data: qs.stringify({ public_token: token }),
      headers: { "content-type": "application/json" },
    };
    try {
      const response = await axios(config);
      console.log(response);
    } catch (error) {
      console.error(error);
    }
  }, []);

  const config = {
    token: data,
    onSuccess,
  };

  const { open, ready, err } = usePlaidLink(config);

  if (err) return "Error!";

  return (
    <button onClick={() => open()} disabled={!ready}>
      Connect a bank account
    </button>
  );
};

export default Link;

Run the Application

docker-compose up

After running docker-compose up -d --build you should be able to go to localhost:80 and connect a dummy account.

Congrats! You are now on your way to implementing a fintech banking as a service application. Kinda like...BaaS...Ok ok. Thank you for viewing. Have a wonderful day!

June 25, 2020

The Undiscovered Self pt. 2

Carl Jung has warned us of the psychic driving performed by the state and church; manifesting the warped conflict between ideals brought about by scientific progress and imperial power. The creation of the mass man, resulting in a lack of unconscious exploration and psychic freedom is for Jung the crisis of western civilization.

Jung's moral prophetization is found in his conception of the individual. For Jung, “consciousness is a precondition to being”, and “the individual is the manifestation of the psyche”. A complete “exception to the statistical rule”. So much so that Jung, believed in the individual’s destruction by state or church had not their psyche been of such great benefit. How then can the individual occasion psychic investigation rooted in their soul? Worse still, how is humankind to become aware of their unconscious self while “s_cience completely devalues individuality”, the church “deems it as egoistic obstinacy”, and the state “seeks to atomize it”.

evil, without man’s ever having chosen it, is lodged in human nature itself

An a priori placing of consciousness and thus the individual. We should begin to understand the compulsion Jung felt to reveal the unconscious. The undiscovered self is the only reprieve for the shadow. Under which reprieve our ignorance of the shadow can persist and the mass man is compelled to entire systems of violence for the people, in gods name, due to science, etc.

For Jung, it was with the acknowledgment of humankind’s ability to act evil that one could gain perspective of the shadow and its projections. This was of such great consequence to Jung that he felt a generational responsibility.

There is no sense formulating the task that our age has forced upon us as a moral demand. We can, at best, make the psychological world situation so clear that it can be seen even by the myopic

Jung could not see a moral solution to this issue but found hope in the rapid technologization of travel and communication.

today we live in a unitary world…Exotic races…ceased to be peepshows in ethnological museums. They have become our neighbors, and what was yesterday the prerogative of the ethnologist is today a political and social problem

He felt as immigration and integration continued, the need for individuals to recognize the gulf of experience between each other and engage in closer relationships will allow a further bridging of the subconscious.

As the book ends, it takes the form of an early anti-racist stance. We see Jung transition from the condemnation of racism to the call for us to lift relationships based on a deepened understanding of the other from self-knowledge:

The European has also to answer for all crimes he has committed against the dark skinned people during the process of colonialization …the white man carries a heavy burden. The evil that comes to light in man undoubtedly dwells within him [and] is of gigantic proportions…He does not deny that terrible things have happened and still go on happening...when such deeds belong to the recent or remote past, they…sink into the sea of forgetfulness, and that state of chronic wooly mindedness returns which we describe as “normality”. In shocking contrast to the fact that nothing has finally disappeared and nothing has been made good. The evil, the guilt, the profound unease of conscience, the obscure misgiving are there before our eyes , if only we would see. Man has done these things; I am man, who has his share of human nature; therefore I am guilty with the rest and bear unaltered and indelibly within me the capacity and the inclination to do them again at any time.

From here, Jung reaffirms his principle of understanding.

A human relationship is not based on differentiation and perfection, for those only emphasize the differences or call forth the exact opposite; it is based rather on imperfection, what is weak, helpless, in need of support.

He justifies by saying positive human relationships are key to the fight against the dictator state because it keeps us from being depotentiated social units the state dictator aims for #FuckDonald.

The last chapter is only a few pages long, but here we get more great bars like;

What our age thinks of as “the shadow” and inferior part of the psyche contains more than something merely negative. The very fact that by self knowledge, i.e. by exploring our own souls, we come upon the instincts and their world of imagery should throw light on the powers slumbering in the psyche, of which we are seldom aware long as all go well

And another that made my toes warm;

Happiness and contentment, equability of soul…meaningfulness of life…can be experienced only by the individual and not by a State

And ends in typical “I'm spiritual but not religious fashion”

I am neither spurred on by excessive optimism nor in love with high ideals, but am merely concerned with the fate of the individual human being — that infinitesimal unit on whom a world depends, and in whom, if we read the Christian message aright, even god seeks its goal

This book is the result of someone living through a period marked by legitimate fascism, war, and the excess of imperialism. I imagine some of what Jung saw is still ahead, but I remain hopeful humans can come to understand each other.

Issues

I find the lack of location of this force that organizes people to collective action representative of an error in perceiving the individual as an atomic unit as opposed to fluid in our self/other boundary.

The “shadow” is important metaphorically, or for the vibes, but what does it mean right? For instance, Viktor Frankl identifies a personal aspect of his patient’s human experience and reinforces their ability to reorient the way they perceive a challenge through meaning and purpose. I’m not quite sure if shadow therapy is just talking about myself or taking DMT. This may not be the place for Jung’s analytical methods, but without them, it feels like Jung is telling me to try ecstasy or meditate, I don’t know.

Both culminate in a lack of specificity. There just seems to be an idealistic romanticism of the inner spiritual experience of humans or an essentially amoral character of his beliefs that seeks personal psychic investigation over collective behavior. Neither account for motivation for self-understanding. I vibe with that though.

June 18, 2020

The Undiscovered Self pt 1

As social beings, humans can find themselves lost in a state of subjective annihilation resulting in what Jung terms the mass man.

This “mass man” is more a function of society or the political collective rather than of the individual self.

Another type of subjective annihilation can be found in the collective believer. Jung does not take this to be one who truly believes in God’s (psyche) power over judgment and the extramundane one intimately finds themselves a part of or indirect access to. The collective believer in Jung’s view is indifferent to religion as a personal relationship with self and the extramundane, and forms creeds rooted in the religious institutions they happen to participate in. They are, as the mass man, subjects of institutional authority.

Jung expresses this in a powerful statement on the role of state and religious institutions, writing:

both lack the very thing that expresses and grips the whole man, namely, an idea which puts the individual human being in the center as the measure of all things

This becomes dangerous to Jung, as Western civ prioritizes the collective self, positing the individual as non-important to the functioning of the systems running the lives of millions.

the individual becomes morally and spiritually inferior to the mass, and for this reason, they do not burden themselves…with the real task of helping the individual to achieve metanoia, or rebirth of the spirit

For Jung, western civilizations’ only goal is the use of; tyranny(specifically socialism/fanaticism) in Russia, scientific weltanschauung in the Americas(Foucault much), or brazen egotism and skepticism in Europe to further its materialistic and collectivist goals. We should consider these phenomena as the methods by which dominant power structures seek to minimize the individual so that the individual becomes the mass man.

The Church takes this on with its creeds and thus becomes the motto “God Bless America”. The state and the church become complicit in the creed creations and impetus towards the “mass man” resulting in the deprivation of individual self-realization/individuation. Jordan Peterson has a very interesting take on this facet of Jungian belief. In the face of the dominance hierarchies humans have emboldened for centuries, it is imperative that we find a relationship with a higher power so that we may come to know and unveil our lesser nature hidden by meaning archetypal to our experience as human beings. But we remained warned:

veneration of the word has a perilous shadow side…the moment the word…attains universal validity, it severs its original link with the divine. There is then a personified Church, a personified State; the word becomes credulity…the word itself an infernal slogan capable of any deception.

For Jung, a religious belief system is an appropriate counterbalance to mass mindedness in either form, but Jung argues Christian symbolism falls short in producing the synthesis required of the ego to experience metanoia.

In the state, the individual plays no role in the collectivist aim to produce more, ad infinitum, so religion should be the stopgap as Jung believes:

the individual in his dissociated state needss a directing and ordering principle

Ego consciousness would like to let its own will play this role, but overlooks the existence of powerful unconscious factors which thwart its intentions

And later says

the believer is measuring his conscience by the traditional ethical standard and that by a collective value

It is in this vulnerable state of searching for meaning in life that Jung locates the power of psychology for subconscious confrontation. Christianity’s inability to update its symbology for the “Christian white man” is proof of the religious creeds that iterate over state and institutional collectivism rather than providing an environment for individuation. State fanaticism has even a steeper slope to fall from for the individual. Western scientific weltanschauung is occurring in the face of imperialism, racism, and sexism. The individual, in their disassociation, should thus become the subject of psychological analysis. For Jung, an examination of the relationship between a self and the machinations employing that self, so that ego synthesis can be formed, is the goal of psychology.

My fear is that, even in the zeitgeist of mental health, it should be fair to ask if psychology is merely another tool for producing an individual that conforms to society, rather than assisting one through subconscious confrontation.

We shall end it here. In the later sections, Jung focuses on understanding and self-knowledge in a world of rapid technological development. I think it best to preview the next post with how he starts chapter five and his focus on the drastic real event in one’s life:

Only when conditions have…altered so drastically that…an unendurable rift between the outer…and our ideas now become antiquated…that….the question of how primordial images that maintain the flow of instinctive energy are to be reoriented

Part 2