My Haskell Setup

TL;DR: I use direnv to add stack path --bin-path directories to project-specific PATH variable. I also only use Stackage LTS which has ghc-mod as part of the distribution.

  • Install Stack using: curl -sSL | sh
  • Install Atom using the .deb file they provide.
  • Install direnv using: sudo apt install direnv
  • Add the following line at the end of the ~/.bashrc file: eval "$(direnv hook bash)"
  • Run apm install language-haskell haskell-ghc-mod ide-haskell-cabal ide-haskell autocomplete-haskell ide-haskell-repl
  • Find the latest LTS Stackage distribution that has ghc-mod in it using this page. In my case it is LTS Haskell 8.24, use that for all stack installations and new projects. Without ghc-mod your development will be very slow even if you have a newer GHC compiler.
  • Use the above Stackage version to install the following compiler tools and copy them to your stack’s compiler tools directory: stack build --copy-compiler-tool --resolver lts-8.24 hlint stylish-haskell hasktags hoogle intero ghc-mod
  • Create your stack project as usual. e.g. stack new my-project --resolver lts-8.24
  • Create .envrc file in your project directory with the following content in it: export PATH=$(stack path --bin-path)
  • Run direnv allow . in your project directory so that .envrc is used.
  • Run stack test --fast --haddock-deps --file-watch and keep it running while you develop.
  • Open your project in atom, and everything should work without further changes to settings.

OOPs vs pure functional programming

The central tenet of object-oriented programming is perhaps the encapsulation of shared mutable state and behavior into a single unit, the object. This is beneficial because shared mutable state is mutable and shared, and by limiting what behaviors can mutate the state and how the state is shared, we make the program comprehensible.

Everybody can come up with a scheme to mutate state and share it, in a way that they themselves think they are able to understand all the implications of doing so but almost often they are wrong. There are hidden implications of having excessive mutable state listed below.

A real programmer should face mutable shared state with humility and not multiply it reveling in his own ability to understand it.

Object-oriented programming does not limit the programmer from increasing mutability and “sharedness” of state. It merely suggests good practices called “design patterns” that programmers follow them, when convenient, if at all.

As a consequence we have:

  • Good practices decided by purported experts like Gang of Four and people like Martin Fowler who do not have any good reason why they are right except that they are influential. They got influential by preaching feel good practices they discovered through experience which like religion feels right. And to be fair there is some truth in good design practices much like how basic religious tenets of mainstream religions are honorable. But excessive adherence to such practices often reveals their weaknesses.
  • The entire industry plagued with hipsters who come up with one framework/paradigm every week that follow the above mentioned good practices in various ways trying to find the next great magic formula for managing complexity.
  • Abstractions that are only used in job interviews to hire programmers to maintain poorly written code which does not use any of the said abstractions.
  • Debuggers are necessary because of excessive mutable state.
  • We have to constantly run the program to know if it works. Test-driven development, behavior drive development arises from this. This is called operational semantics as opposed to denotational semantics.
  • Formal verification methods involving mutable state is exceedingly complex.

Pure functional programming school of thought plans to create a brave new world order by liberating people from this mess. You have nothing to lose but your chains. 😉

  • Pure functional programming abolishes all mutable state. Mutability only exists as a syntactic sugar if at all, and only a simulacrum of mutation exists.
  • Pure functional programming abolishes all shared state.
  • As a consequence encapsulation is unnecessary and even detrimental. All we need is namespacing.
  • Pure functional programming does side effects without losing denotational semantic properties of functions.
  • Instead of relying on experts preaching good practices we rely on theoretical results which yield terseness and better denotational semantics i.e. the ability understand program behavior without running it.
  • Debuggers are rarely needed.
  • Test-driven development is replaced with proof-driven development and random test case generation.
  • Job interviews are about abstractions which are actually used in the code base not some nice to have design pattern postponed because of deadlines to gradually create messy code.

How more USD will create more war

USD and other IMF SDR basket currencies maintain their exchange rates despite excessive supply because there is an excess demand to match.

USD and JPY maintain their excess demand by lending out newly created currency for interest, but only the principal is created initially. And the interest is almost always never created.

The principal is used by the borrower nation to pay for infrastructure and weapons bought from the corporations of the lender nation. These corporations then park these dollars in a way that does not raise prices of common goods. They use means like bonds, and equity in other corporations and in startups to do it (this is how Snapchat fetches billions of dollars in capital).

The interest needed to pay back the original loan creates a perpetual excess demand for the lender’s currency.

The lender uses such an excess demand for their currency, combined with excess supply and the resulting cheap capital of lender’s currency to fund innovation and technology superiority in its local community.

The problem, however, happens when easy money leads to more corruption, more propaganda, unwise movements to make the world more socially-just/progressive/protestant/Catholic, and the eventual drying up of innovative ideas to tap into and create a technological dominance out of.

Once that happens in order to maintain foreign excessive demand for the lender’s currency, the lender nations will have to start selling weapons and even create wars to spend the weapons on.

The world will then go to war with each other, while the local communities of the lender nations will stop breeding thanks to divisive propaganda and unwise ideological indoctrination against sexes, races, and religions.

Corruption will do the rest, by gradually eroding trust in the State to fix problems, and create private alternatives like the Mafia instead. Private gun ownership might help stave off total destruction.

Second law prevails as usual. Without external systems to export entropy to it creates entropy within. In this case, the system is the world.

Linus’ security philosophy applied to puritanism

Linus Torvalds rebuked Linux kernel hardening efforts today for sacrificing availability/accessibility so as to achieve security. He said,

Because without users, your program is pointless, and all the development work you’ve done over decades is pointless.

To quote Steve Yegge,

Accessibility is actually more important than Security because dialing Accessibility to zero means you have no product at all, whereas dialing Security to zero can still get you a reasonably successful product such as the PlayStation Network.

Religious (e.g. fundamentalists), political (e.g. Soviet system) and secular (e.g. social justice activism) puritanism often ends up making normal life impossible in the name of greater purity. So to paraphrase Linus:

Without followers, your ideology is pointless, and the revolution you’ve had over the decades is pointless.

Similarities between AI, biotechnology and the atom bomb

Some months ago, when the bomb was still only a rumour, there was a widespread belief that splitting the atom was merely a problem for the physicists, and that when they had solved it a new and devastating weapon would be within reach of almost everybody. (At any moment, so the rumour went, some lonely lunatic in a laboratory might blow civilisation to smithereens, as easily as touching off a firework.)

… However, it appears from President Truman’s remarks, and various comments that have been made on them, that the bomb is fantastically expensive and that its manufacture demands an enormous industrial effort, such as only three or four countries in the world are capable of making.

George Orwell (19 October 1945)

People say that about AI and biotechnology these days.

It is possible that when the technological hurdles in AI and biotech are finally solved, the details of how to make them will be so painful and boring that no one will even bother to figure it out.

However, every once in a while we are hit with technology that democratizes power into the hands of the many much like guns did. AI could also be that.

Humanity (or at least an intelligent few) would then become conjurers of spirits which amplify the desire to change the world as they saw fit.

My only hope is that a God is born among us because of such pursuits. We will call the God: Immanuel, meaning God is with us.

Christianity & Islam as immune system responses to Judaism

Ibn Khaldun would say Judaism has one of the highest Assabiyah in existence in any religion.

The Jewish tribes can function as a unit even in the absence of global telecommunication while being spread across the globe. Much like how bedouins function across a single desert. But while the bedouins only face the elements in a single desert, the Jews face billions of potentially hostile unconcious minds across the globe.

In the so called “Dark Ages” and even in ancient Rome and divided Arabia, I think both Christianity and Islam arose as a defense against a Jewish invasion of the psyche of the minds of the people. Both religions seem to have taken two paths.

Christianity as engineered by the ancient Romans took the left liberal leaning path some equality and some liberty for all under God.

Islam as engineered by the Arabs took the right conservative path of increasing Assabiyah through constraints on equality and liberty, and total submission under God.

Both pretend to be a Jewish revival. Seems like Christianity won’t be able to survive in the post-industrial low-fertility world with feminist values. But Islam will make it alive. And the Soros led forced migrations seem to be meant towards destroying Christianity.

If global change in political/moral values are understood as primarily a Jewish construct, then the destruction of the various imitation Judaisms seem to be it’s end. Modeling history as a war against imitation Judaisms makes it very easy to understand.

Apologies for being a crackpot. And I don’t think this view is anti-Semitic. To the contrary it is an amazing social phenomena that should be studied.

Reputation Sink

Society needs a Reputation Sink to blame all of it’s ills on. It is not enough that bad things happen but there has to be somebody or a group of people to blame.

This is why inventing phony Reputations Sinks, if none exists, is essential, during conflict or during periods of high uncertainty.

The various deep states and their public relations departments are ideally positioned to create reputation Sinks due to their high social cohesions (see Khaldun)

Ideally, the reputation Sink should possess the opposite qualities from that which the deep state possesses externally.

So the Reputation Sink:

  • Has to be a non-state actor and/or not powerful/rich.
  • Must have an ambiguous means to determine membership: anybody who does public harm can be claimed to be part of the reputation sink.
  • Should be famous or made famous.
  • Should have the opposite values or beliefs to what deep state pretends to have.
  • Should be uneducated.

Example: Notice how a certain Islamic terrorist group claimed ownership of the perpetrator of the Nevada gun shooting when he shot a mostly conservative audience at a country music event. Had no such ownership been claimed the blame would have automatically gone to the progressive faction for being violent against the conservatives. So we should assume the claim to ownership was fabricated by the progressives themselves who through their public relations departments decided to lay blame on the Reputation Sink. Also the debate is also about how all shooters are white because blacks shooting up churches are not covered by the same PR dept. This is an attempt to slowly convert white people into a Reputation Sink now that their fertility rate is lowering. Finally the debate is also about how banning guns will solve the issue when Switzerland does not have mass shootings proportional to their gun ownership percentage, this is an attempt to use all gun ownership as a reputation Sink.

Digression: Sen. Diane Feinsteins Town Hall  in which an immigrant was claiming Deportation Forces are chasing him is now not receiving enough attention. The narrative of the deportation forces ought to  have been the narrative of the week. This leads me to believe the progressive deep state was not expecting the Nevada shooting. It is also possible that a conservative deep state aided paddock in carrying out the shooting.
Other reputation Sinks that have been or are being tried are Russia (notice how hacking elections turned into purchasing Facebook ads), Anonymous (notice how they never ddos progressive websites), China (notice countries neighboring it are being destabilized and all Chinese borders are have “border disputes”), evil science denying white straight male capitalists who cause climate change.

We have to always be at war with the Boogeyman, because without one we will lose hope knowing that evil is random and often without purpose.

Chaos and entropy are the true Boogeymen. This is why I will do whatever it takes to run away from it, except give up my ability to create order: Cosmos.