Here's an unfinished story that I started as a response to the Avengers movie.

Read more... )

Ho Chi Minh lived a life of sin
that's high livin with coke and vin

Mao Tse Tung liked his girls real young
He'd take them home and give them tongue

Fidel Castro went for the asshole
He was a bearded Cuban pederasto

Joseph Stalin was real big ballin and all around the clock
Babushkas lined up for seven blocks to ride his commie cock

From one of my fanfics in progress, meet Mick and his team of combatants who seem very familiar but have been renamed so I could feel comfortable changing their characterization to suit the development of the story. Read more... )


Nov. 16th, 2016 08:09 pm

Put the best five guys in the NBA together on one team and put them on the court. You'll see brilliant plays by one player at a time, but they won't play to their peak potential because they're not used to playing with each other as a team. They are not familiar with each others' instincts. They are not used to working together.

Take the guys ranked 25 through 30 and let them train for a month, practice, and get used to each other. Then put them up on the court against the top five guys. They'll win. Why?

Because 25 through 30 is six people.

From NPR:


* FIRST, propose a Constitutional Amendment to impose term limits on all members of Congress;

The parties tell the Congressmen what to say and who to give favors to or else they don't get support for their next campaign and they don't have a job in two years. Congressmen are already interchangeable cogs in a corrupt system. The proposed remedy only regulates the time of their replacement with new cogs. It does not address the corruption.

Alternative: Zephyr Teachout found that lobbying used to be a crime. Legal historians should conduct further research in this area to see if such a law could be enforced.

* SECOND, a hiring freeze on all federal employees to reduce federal workforce through attrition (exempting military, public safety, and public health);

So Trump is promising not to add any of his own people to government? I don't think he has thought this through.

Alternative: Seek out corrupt individuals and wasteful departments and cut them. Seek input from federal employees about wasteful spending and guarantee new jobs for anyone whose reports lead to the cutting of their own job.

* THIRD, a requirement that for every new federal regulation, two existing regulations must be eliminated;

Such strict requirements usually cause more harm than good.

Alternative: Seek out and streamline poor regulation.

* FOURTH, a 5 year-ban on White House and Congressional officials becoming lobbyists after they leave government service;

I would extend this to all managerial-level employees.

* FIFTH, a lifetime ban on White House officials lobbying on behalf of a foreign government;

The same 5-year ban may be enough. We also need to be clear about what kind of lobbying for foreigners is already illegal. What law was used to charge Tokyo Rose?

* SIXTH, a complete ban on foreign lobbyists raising money for American elections.

Is this not already illegal? They will simply launder money through an intermediary as they already do. We need more prosecution of money laundering.


* FIRST, I will announce my intention to renegotiate NAFTA or withdraw from the deal under Article 2205

Good. This gives us a large amount of room to change our mind if we need to. A renegotiation may be all that is necessary.

* SECOND, I will announce our withdrawal from the Trans-Pacific Partnership

Good. That treaty was horrible.

* THIRD, I will direct my Secretary of the Treasury to label China a currency manipulator

I am unsure of the implications of this.

* FOURTH, I will direct the Secretary of Commerce and U.S. Trade Representative to identify all foreign trading abuses that unfairly impact American workers and direct them to use every tool under American and international law to end those abuses immediately

It's good to investigate and counteract such abuses, although a too-aggressive approach can cause diplomatic problems.

* FIFTH, I will lift the restrictions on the production of $50 trillion dollars' worth of job-producing American energy reserves, including shale, oil, natural gas and clean coal.
* SIXTH, lift the Obama-Clinton roadblocks and allow vital energy infrastructure projects, like the Keystone Pipeline, to move forward

Some of those restrictions are in place for a good reason. The industries will want you to lift everything that gets in the way of them making more money quicker, regardless of the risk. If something goes wrong, the cost is eaten by everybody else but them. The government has a duty to make sure they don't work so cheaply that it risks an environmental disaster.

Law and order

* FIRST, cancel every unconstitutional executive action, memorandum and order issued by President Obama

I assume that a list of such orders has already been drawn up. Otherwise this is campaign rhetoric masquerading as a policy.

* SECOND, begin the process of selecting a replacement for Justice Scalia from one of the 20 judges on my list, who will uphold and defend the Constitution of the United States

As expected.

* THIRD, cancel all federal funding to Sanctuary Cities

I can support this, but is it legal?

* FOURTH, begin removing the more than 2 million criminal illegal immigrants from the country and cancel visas to foreign countries that won't take them back

Letting ICE know that they are allowed to do their jobs will be a big step forward.

* FIFTH, suspend immigration from terror-prone regions where vetting cannot safely occur. All vetting of people coming into our country will be considered extreme vetting.

Yes, this was a campaign promise. We should also begin the process of developing a vetting system, which will require in-country humint willing to leave their hotels.

100 days measures

Middle Class Tax Relief And Simplification Act

Simplification is more important than tax relief, in my opinion. The middle class wants a smaller tax workbook and to cut a smaller check.

The bigger taxation problem is tax evasion by the wealthy moving money offshore and avoiding taxes. We need to close loopholes and give prosecutors a green light to investigate tax evasion.


My opinion on tariffs is that they should be kept low to open a window of market opportunity for domestic producers without wholly freezing out imports from people who may want them.

I also oppose tariffs on raw materials. Raising the cost of the basic building blocks of our industry will increase the costs of everything. Also, we can let other countries ruin their environments before we do.

We should consider a tariff based on labor conditions, where we task the State Department to see whether any country effectively enforces its own labor laws and send annual reports to Congress which has the final say on lifting or imposing the tariff. This could discourage slave labor practices by international industries, make outsourcing less competitive, and appeal to the foreign working poor which could have long-term diplomatic benefits.

American Energy & Infrastructure Act

This is too vague to have an opinion on, but I have some concern about what those "public-private partnerships" might be.

School Choice and Education

Parents want vouchers for private schools because the public schools stink. This cannot be fixed from Washington, but we can certainly make it worse if a reform plan goes wrong. We should keep an eye out for fraudulent abuse of the voucher system, like any other government program.

Common Core can be done away with. The "Commie Core" conspiracy theories turned out to be true, the data collection is dangerous, the new materials are notoriously poor. Free the school districts to keep whatever works and discard the rest.

Repeal and Replace Obamacare Act

The problem with American healthcare is that something is unnaturally driving up medical prices. Many problems go away if we can fix that. Some suggestions to begin to address the issue: enforce antitrust law, carefully reduce the volume of regulation, ask office clerks from the medical industry to send suggestions to HHS.

As for Obamacare, any centralized medical care system becomes inefficient due to the lack of competition and the inability to compare it to a neighboring system. The fact that there is a medical system is itself the problem. Single payer is the best system on paper. It works for one generation and then the inefficiencies of a sedentary industry start building up. We should distribute policymaking decisions out to the states to allow different ideas to succeed or fail.

End Illegal Immigration

I have no idea how Trump plans to get Mexico to agree to pay for the wall. Seizures of drug gang assets? That will require legal work.

We should punish businesses that knowingly encourage illegal immigration. There is a black market for labor. Some businesses hire illegals because they can screw them over and the workers cannot file suit.

The other side of the immigration coin is to encourage legal immigration. The process should be quicker and have less paperwork. Some form of the old Bracero program could be used to address the need for farm labor and add legal oversight so that workers' rights are not artificially suppressed by employers exploiting immigrants.

Restoring Community Safety Act

Some police training programs backfired and created the "shoot first" policy that has reduced trust in police. That's something the program administrator should be aware of.

In some areas there simply aren't enough people to deal with crime problems. In some areas morale is an issue. In others the gangs are inside the police force. It's a mess and I don't have answers.

Organized crime is probably a bigger problem than violent crime. A good educational policy will address both in time.

Restoring National Security Act
Clean up Corruption in Washington Act

Both descriptions are too general to criticize.

Turkey, Russia strike strategic Turkish Stream gas pipeline deal

Aren't they in a shooting war with each other? They're using proxies, but still.

6:00 before the debate, Chris Matthews does Trump's job for him by saying that he could point at Clinton and one of his rape accusers and say "he raped her"

6:01 Rachel Maddow joins in! Apparently the Trump campaign announced the rape accusation earlier in the day.

6:03 MSNBC mentions that people consider the Trump campaign to be over.

6:05 questioner complains the last debate was NSFW.

6:06 Clinton "looking for ways to celebrate our diversity" and segues into call for increased school funding, ignores the question

6:08 Trump agrees with Clinton, says that "Make America Great Again" means getting rid of Obamacare and the Iran deal.

6:10 Trump panders to "the African Americans who are so great" and Latinos

6:10 Moderators remind them what the question was!

6:10 Trump denies he said what he said in the recording that has been in the news all weekend, tries to change the subject to ISIS.

6:11 Moderators ask Trump to put a denial on the record, Trump refuses and changes the subject.

6:14 Clinton complains that Trump rates women's attractiveness on a scale of 1-10 like everyone else including all women.

Early scores:

Clinton: F
Trump: F
Moderators: B

6:17 Second question, moderators ask Trump how the campaign has changed him. Trump replies by attacking Bill Clinton's moral scandals and Clinton's defense work for the rapist back in the '70s. Audience applauds.

6:19 Clinton accuses Trump of going low, claims to be above that. Audience applauds.

6:20 Clinton says Trump attacked (Saqib?) Khan's family over their religion, attacked a Latino judge over his race (wasn't he a member of a radical group?), claims Trump never apologised for the birther movement that he held a press conference to reject

6:21 Trump brings up vicious commercials involving Michelle Obama

6:23 Trump promises to appoint a special prosecutor to investigate Hillary Clinton.

6:24 Clinton claims everything Trump said was false, audience boos

6:24 Trump promises Clinton will be in jail, audience cheers.

Remembering that the question was how has the campaign changed you, neither addressed the question.

Clinton: F
Trump: F

6:25 moderator asks about the email scandal. Clinton takes responsibility for "using a personal email account" which is very understating. Clinton talks about "misleading accusations", claims "no evidence that anyone hacked the server" and "no evidence ... that any classified material ended up in the wrong hands".

6:28 Trump interrupts Clinton after the moderators tell him not to, at least three times

6:29 Trump asks the moderators why they haven't brought up the emails... after they did.

Next question is how will you bring down the cost of medical care.

Both Trump and Clinton refuse to answer first. Clinton has to answer, says "I'm gonna fix it" and promotes policies that expand benefits without explaining how to pay for them.

6:32 Trump "It's such a great question" and "Obamacare is such a disaster" wants to replace it with something that works, calls for allowing insurance companies to compete across state lines (do they not already?), offers block grants for medicaid

Both Trump and Clinton interrupt the moderators.

Clinton: F
Trump: F+ because he gets credit for proposing something that could conceivably reduce costs

6:38 Next question is about Islamophobia and how to avoid labeling Muslims as threats.

Trump agrees, says Muslims have to report problems when they see them. Implicit reference to CAIR telling people not to report. Complains Clinton and Obama won't use the term "radical Islamic terror".

Clinton says "violent jihadist terrorists" to prove she can.

Moderators ask Trump whether or not he still calls for a ban on immigration from Muslim countries.

Trump changes the subject to "Captain Khan is an American hero" and says that he would be alive today if Trump were president back then. Moderator asks him to answer the question, he refuses.

Moderators ask Clinton about whether importing "Syrian" "refugees" is a good idea. Clinton blames the Syrian war on Russian aggression.

6:46 Clinton says Trump supported the war in Iraq and they have it on video, Trump denies it and reminds her that she voted for the war.

Clinton: D
Trump: D

Next question is about Wikileaks release of Clinton's paid speech where Clinton admitted having a public and private position on issues. Is it acceptable for a politician to have a private stance on issues? It doesn't matter, it's normal.

Clinton credits Abraham Lincoln for the quote.

6:49 Clinton says Wikileaks is part of a Russian hacking program to influence the election. I wouldn't be surprised. Clinton goes after Trump's tax returns.

6:51 Trump: "Honest Abe never lied."

6:51 Trump: "I know nothing about Russia. I know nothing about the inner workings about Russia." If you manage to get elected, please find someone who does.

Next question is what specific tax provisions will you change to insure the wealthiest Americans pay their fair share?

Trump promises to get rid of interest (carried interest provision?), blames Clinton for not fixing the tax code while she was a Senator, claims Clinton is "raising your taxes really high"

6:55 Clinton says Trump's tax cuts are bigger than Bush's and will include increased taxes on the middle class. Clinton says she voted for closing a loophole that Trump took advantage of.

Moderator asks if Trump used his writeoff to avoid paying personal income taxes, he says of course I do

6:59 Trump says "depreciation is a wonderful charge, I love depreciation"

7:00 Trump is somehow talking about ISIS now

7:00 Clinton points out that Bush was president when she was in the senate, Trump interrupts Clinton again.

7:01 Clinton talks about childhood adoption, healthcare for 9/11 responders, other Senate accomplishments. Sounds prepared. "400 pieces of legislation have my name on it."

Moderators go on to Syria, mention the questionable video of the dusty boy in a chair, says the State Department calls for war crimes investigation of Syria and Russia for bombing Aleppo, moderators compare that to the Holocaust while Clinton's people are beheading entire communities thousands of people at a time.

Trump on nuclear power: "Russia is new in terms of nuclear. We are old... Very bad." He talks like a six year old.

Moderator says the question was what would you do about Syria and the humanitarian crisis in Aleppo, reminds them that Pence called for the use of military force against Syria.

Trump: "He and I haven't spoken and I disagree"

The moderator argues with Trump over whether the military should announce its strikes a month ahead of a time.

The moderator asks Clinton to use military force to keep Syria from taking back Aleppo, Clinton says she won't use ground forces but will use special forces.

Clinton says she will consider arming the Kurds. Haven't we been doing that for years?

Next question do you believe you can be a devoted President to all the people?

Trump goes all over the place and has trouble completing a sentence.

Clinton talks about loving children and families. Since the moderators have broken Godwin let's call this her kinder kuche kirche speech.

Clinton blames Trump for an increase in childhood bullying.

Moderator brings up Clinton's basket of deplorables statement and asks how can you unite a country if you have written off tens of millions of Americans. Clinton accuses Trump of running a campaign of hatred and has apparently never met one of her online supporters.

Moderator brings up Trump's tweeting at 3AM as an example of bad discipline, Trump changes the subject to Benghazi and denounces Sidney Blumenthal as "not a good guy".

Clinton overtalks the moderators, Trump joins in. Audience laughs at them.

Next question is what is the most important aspect in selecting a Supreme Court justice.

Clinton wants to appoint justices "who understand how the world really works".

Trump praises Justice Scalia and promises to appoint judges like Scalia, somehow changes the subject to how he is his funding his own campaign.

Next question about energy policy.

7:30 Trump: "Energy is under siege by the Obama administration" that sounds like the plotline to an 1980s video game. Trump promotes "clean coal", complains about the EPA.

Clinton mentions China dumping low cost steel, implies Trump is responsible.

Clinton calls natural gas a bridge to renewable fuels. huh?

Next question is would either of you name one positive thing that you respect in one another? Audience applauds.

Clinton offers Trump the opportunity to go first, he doesn't. Clinton says "I respect his children" and "that says a lot about Donald."

Trump credits Hillary as a fighter who doesn't quit and doesn't give up.

Overall score:

5:53 they're going to be introducing the spouses. Who cares?


Subject: Job creation

Clinton gave a smattering of proposals, too many to attempt to contradict any one. With the first opportunity to speak, she stole several of Trump's issues.

Trump calls for bringing back trickle-down economics. Clinton nailed him on it.

Trump called for protectionist import taxes.

Trump sounds like he has a cold. #TrumpsHealth

Clinton aced this section and got in several jabs against Trump. Trump barely registered and sounded unprepared.

Clinton: A
Trump: D


Trump told Clinton "you've been fighting ISIS your entire adult life", possibly the dumbest thing he has said in the whole campaign.


Trump says we are in a big bubble and accused the Fed of being "political" and not doing their jobs.


Trump refuses to release his tax returns, redirects it into an attack on Clinton's emails. Politics as usual.

Clinton makes up a bunch of conspiracy theories about what might be in Trump's tax returns.


Trump plays up his businesses again and the "very fine banks" where he stores his money.

Clinton attacks Trump on his businesses that he always talks up. Brilliant assault on what he claims as a strength.

6:44 Moderator changes the issue to race, "how do you heal the divide?"

Clinton says race determines where you are allowed to live and "how you are treated in the criminal justice system." She gives Tulsa and Charlotte as two examples of racism. Charlotte was a black cop shooting someone who drew a gun on him. Big mistake by Clinton.

Clinton blames "the gun epidemic".

Trump calls for "law and order". No details. Supports stop-and-frisk.

Moderator says that stop-and-frisk was ruled unconstitutional. Trump says he was wrong.

Trump calls for taking guns from "bad people".

Trump appeals to blacks and hispanics and blames politicians for allowing gun violence. Clinton accuses Trump of insulting black communities.

Clinton denounces "systemic racism in our criminal justice system" and wants to "divert people from the criminal justice system". She calls for "common sense gun safety measures" to remove "military style weapons".

Trump brings up Clinton's use of the word "superpredator" and acknowledges that she had apologized for it.

Trump credits stop-and-frisk for reducing murders in New York. Clinton says crime has continued dropping since the practice was ended. Trump: "you're wrong."

Clinton: D
Trump: D

Trump demanded the opportunity to respond, was granted, and started an attack.

Moderator asks Trump about his past support for the birther issue. Trump blames Clinton campaign. Trump takes credit for Obama releasing his birth certificate. Moderator notes that Trump continued pressing the issue for years afterward.

Clinton says Trump started his career by being sued for refusing to rent to black people.

Trump accuses Clinton of treating Obama with terrible disrespect. He would know, he is an expert at treating people with disrespect.

7:06 Moderator changes subject to cyberwarfare

Clinton mentions commercial attackers and Russia, mentions Trump praising Putin. Clinton threatens retaliation for hacking.

Trump mentions his endorsements. Goes on attack on DNC, misses the subject. Talking vaguely about getting tough on cyberwarfare.

Clinton: B
Trump: F


Clinton calls for increased airstrikes on ISIS. Did she miss that we just gave ISIS air support for an attack on Syrian forces?

7:13 Moderator asks how to prevent homegrown attacks

Trump accuses Clinton and Obama of creating a vacuum in Iraq, forgets George W. Bush. Trump suggests leaving troops behind. Yeah, that would have been popular. Trump suggests we should have seized the oil. Yeah, that would have discouraged a rebellion.

Clinton calls for increased intelligence gathering and working with allies.

Clinton accuses Trump of insulting Muslims and she calls for cooperating with "the Muslim community". Unstated, the part of the Muslim community Clinton works with is al-Qaeda.

Trump accuses NATO of not paying their fair share, says NATO could be obsolete, takes credit for NATO opening a unit to concentrate on terrorism. Trump calls for NATO to invade surrounding nations and attack ISIS.

The moderator says Trump supported the Iraq war. Trump and the moderator argue about this. No one mentions Clinton's position on the war.

Clinton notes that Trump called for starting a war with Iran if they taunted our sailors.

Trump demands tribute from countries in America's sphere of influence.

Trump slams the Iran deal.

Clinton: "It is essential that America's word be good." Unless you're Libya.

Clinton praises the Iran deal as very successful.

Trump demands tribute from our allies again. Does he think he's playing Civ 1?


Clinton accuses Trump of saying that women don't deserve equal pay for equal work. The factcheckers need to take a look at this.

7:37 Moderator's final question is whether the candidate will accept losing the election. Holy shit! Why is this even a question?

Trump: "I want to make America great again" and he talks about a DHS immigration scandal. Finally he answers the question and says he will support Clinton.


Clinton: C
Trump: F

Clinton held steady and performed adequately.

Trump was unready, unsteady. He had little of substance to say. His attacks on Clinton were poorly timed and did not land.

Looking over my directory of partially-written bad fanfics, I see:

  • a Batman fanfic where Batman is forced to work together with Slade (the Teen Titans villain) and his team of Bad Guys
  • an Indiana Jones and the Crystal Skull fanfic where Mutt turns into a Timothy Leary dropout druggie in the '60s
  • a Metajets fanfic where I kill off several named characters and put others out of commission
  • a Slayers fanfic that resulted from several iterations of messing with the universe until it was set 20 years in the future and dealing with the heros' kids, and an accompanying outline for a story that destroys that universe another 50 years in the future
  • a Smash Brothers fanfic/parody where the fighters are recruited by a guy who messes up universes for fun
  • an outline for a Stein's Gate fanfic that puts Okabe in the hospital and makes Kurisu the lead
  • a Star Trek:TNG fanfic where the Federation gets in a civil war, and Picard and Riker end up as opposing captains
  • a Transformers fanfic with a little bit of intellectual insight into geopolitics, no tits, and fewer explosions
  • [Edit Sep 10] and one more I haven't begun to write: a Garbage Pail Kids fic that patterns the dolls after stereotypical 1950s gangbangers, removes all the grossout humor and replaces it with slapstick, and makes the dolls one faction in a great Toy War involving parodies of Barney, Pokemon, GI Joe, He-Man, Green Army Men, and the Care Bears

My imagination doesn't like to stay within the bounds of an existing universe. I don't write episodes. My tendency is to do something grand with it that changes how the universe is arranged.

Bonus: have some parody ideas that I haven't written but I can tell the whole joke in one paragraph.

  • Metroid: rough brunette '80s Samus wakes up from cryosleep and mugs sexy blonde Zero Suit Samus in an alleyway, then takes her armor back
  • Touhou: Komachi and Reimu set up a racket where Reimu hunts and kills wealthy criminals, Komachi ferries their souls across the Styx to meet her work quota while charging them a significant fee, and then Komachi makes a donation to Reimu's shrine. Then the loli vampire Remelia appears in Reimu's room at night to warn her that pedophiles are *her* business.
  • Touhou again, crossed with End Of Evangelion. Enough said. No, I can say more. The invaders are the TF2 characters, then I ran out of ideas so let's redo the Twilight Zone doll episode with Shang, Pyro, and Engineer.

In most RPGs, health does not replenish between battles. You have to go to an Inn.

Getting ground down over a large number of battles, with enemies taking a small amount of HP at a time, is boring. A solution to the boredom problem is to have a smaller number of battles where the enemies do more damage. This now poses another gameplay problem: normal enemies will tear you apart unless you have healing items, so it is possible for part of the game to be impossible if you are one health potion short. The solution to that problem is to make it easy to reheal to full health between battles by making healing spells cheap and putting healing areas in dungeons. Some game developers threw up their hands and let your party automatically restore to full health between battles. We also have a conceptual change in that HP no longer represents fatigue. If you restore to full health all of the time, you are no longer getting ground down.

Let's split the middle.

First, we will make the combat attributes - HP, MP, Mental State, etc - the final result of a multi-stage process where one stage draws energy from the previous stage over game-time.

Core -> Reserve -> Immediate

  • Your Core energy is a huge stockpile that represents all of your energy for the day.
  • Your Reserve energy is refilled from your Core energy at a relatively low rate. That is basically its purpose, to prevent Core from being drained in a single encounter.
  • Your Immediate energy is what you use in battle. You cast magic using MP. You swing a sledgehammer using physical energy. Your Immediate energy is refilled from your Reservoir at a relatively high rate. You can get tired by fighting too many things at once, but if you get away and rest a while, you can recover.

The result is a system where your HP will normally refill between battles, but will not be refilled all the way if you immediately run into a second battle on the next square.

Now let's extend the idea. You can fiddle with the transfer functions. Maybe they work slower as Core goes down. Maybe they work slower as the target reservoir fills up. Maybe there is an external variable that pushes down your maximum refill over time. The result now is a system where you might restore back to full health after twenty steps, but five battles later, going twenty steps may refill you back to 80% health. Ten battles latter, twenty steps may refill you back to 60% health. Your dungeon divers are now getting ground down over time, and there is a logical and gameable system behind it.

If you need energy RIGHT NOW, you could cast a spell to refill the Reserve by burning a significant chunk of Core. You might be healthy again but your health will not restore as quickly as the other party members. Suddenly there is a downside to casting those cheap healing spells.

Your spoony bard and spoiled princess may run low on Core energy and start falling over before the hardier blacksmith, ranger, and solider. The energetic attacker whose skills go all-out may run out of steam before the others. You might be encouraged to swap out the active members of your party to let the members with low Reserve recharge.

This system could work well in action RPGs or any RPG with a day/night cycle that tries to represent the passage of time.

Sources are biased and there is a lot of disinfo out there during campaign season but it sure looks like the Clinton campaign is hauling out the Orlando shooter's father as a celebrity supporter.

A new preview release of Swift 3 is out this month. I tried compiling it with debugging flags turned on, left my computer running, and came back several hours later to a failed build.

FAILED: lib/
(...cut giant parameter list...)
clang-3.7: error: unable to execute command: Killed
clang-3.7: error: linker command failed due to signal (use -v to see invocation)

Huh. I tried it again while browsing the web in the background. A few hours later, my system started swapping like crazy. KDE froze for minutes at a time. top showed several ld processes each using over 1GB of memory. I think it died when one of them hit the 32-bit limit at 2GB.

So, WTF? Let's check out the sizes of some of these libraries.

560968756 Aug  6 19:22 libclangSema.a
620546286 Aug  6 19:49 libclangStaticAnalyzerCheckers.a
660270964 Aug  6 19:19

And let's see what's in some of these archives.

~/swift/src/build/Ninja-DebugAssert/llvm-freebsd-x86_64/lib% ar -tv libclangStaticAnalyzerCheckers.a
rw-r--r--       0/0        164312 Dec 31 16:00 1969 AllocationDiagnostics.cpp.o
rw-r--r--       0/0       7163456 Dec 31 16:00 1969 AnalyzerStatsChecker.cpp.o
rw-r--r--       0/0       7142344 Dec 31 16:00 1969 ArrayBoundChecker.cpp.o
rw-r--r--       0/0       7290936 Dec 31 16:00 1969 ArrayBoundCheckerV2.cpp.o
rw-r--r--       0/0       9251672 Dec 31 16:00 1969 BasicObjCFoundationChecks.cpp.o
rw-r--r--       0/0       7271432 Dec 31 16:00 1969 BoolAssignmentChecker.cpp.o
rw-r--r--       0/0       7159208 Dec 31 16:00 1969 BuiltinFunctionChecker.cpp.o

There are many object files in the 7MB range. It adds up. Looking at one of them with elfdump, nearly all of the space is used by DWARF debugging info.

entry: 730
        sh_name: .debug_str
        sh_type: SHT_PROGBITS
        sh_addr: 0
        sh_offset: 26152
        sh_size: 3267448
        sh_link: 0
        sh_info: 0
        sh_addralign: 1
        sh_entsize: 1
entry: 734
        sh_name: .debug_info
        sh_type: SHT_PROGBITS
        sh_addr: 0
        sh_offset: 3296469
        sh_size: 1252146
        sh_link: 0
        sh_info: 0
        sh_addralign: 1
        sh_entsize: 0

entry: 735
        sh_name: .rela.debug_info
        sh_type: SHT_RELA
        sh_addr: 0
        sh_offset: 5007208
        sh_size: 2054928
        sh_link: 748
        sh_info: 734
        sh_addralign: 8
        sh_entsize: 24

How big are the original source code files?


So that gets turned into 7MB when debugging flags are turned on, and it all goes over 2GB when multiplied by the many files in a large package. This causes the build to fail.

Copying straight from John Schindler's twitter:

If @realDonaldTrump wants to clear up his Kremlin ties (see piece), let's resolve it now. A few simple questions.

  1. Does Trump or the Trump Org owe any funds to any Russian entities, state or private?
  2. Has Trump met or talked with Putin -- ever? The Donald has been all over the map with this one, but it's an easy question.
  3. Did Trump affiliates change the #GOP platform in Cleveland on #Ukraine -- or not? If so, who told them to?
  4. Has Mike Flynn (Trump's #natsec guru) accepted payment from RT or any other Russian government entities?
  5. Does Trump approve of comments made recently by Carter Page (his Russia guy) in Russia that sharply criticized the USA?
  6. Does Paul Manafort (Trump's campaign chair) currently accept any funding related to his years of work in #Ukraine for Yanukovych?
  7. Why is Roger Stone, a close friend of Trump's praising Julian Assange as a "hero" -- and does Trump agree with that assessment?
  8. What is the exact relationship between Trump and/or Trump Org and Felix Sater?
  9. The Trump campaign was warned about Russian influence in its ranks -- why did you ignore these warnings?
  10. A few simple questions that are easy to answer....if you want to. Let's hope @realDonaldTrump does.

A note of possible bias: Schindler is employed by Trump's kids.

Tonight I pounded out a new scene from a fic I'm never going to finish. Part of me says, oh, it looks nice! Share it! Another part of me says, this burns many of the plot points and characterization quirks that are supposed to be revealed during the course of the story, so I should hold off until I've finished it. Then I remembered that I'm not going to finish this story so I might as well post it, and it makes a good summary / introduction to the universe. Enjoy.

Read more... )

Scrap Dump

Jul. 31st, 2016 06:56 pm

pattern for resolution of an abstraction to a meaningful value

A = an abstract something

function f(A) {
  if(A == "FOO")
    return FOO
  if (A == "BAR")
    return BAR 
  if (A matches /[A-Za-z0-9]+/)
    return TOKEN_ALNUM
  if (A has method "next")
    return I_SEQUENCE
  if ( not (A contains meat) )
    return VEGETARIAN

  return DEFAULT 

This can be generalized to a function taking input:

   f(A, DEFAULT, array of [f_comparator -> f_resolver])

where the comparator function runs a comparison or pattern match on A, and the resolver function takes A and produces an output.

Possible error conditions:

  • All comparators fail. Solution: force caller to provide a DEFAULT value, have the caller handle it.
  • Multiple comparators match. Possible solutions:
    1. Use the first matching comparator.
    2. Give different values to comparators. Use the comparator with the highest matching score.
    3. (combination of 1 and 2) Sort the comparator->resolver pairs by comparator value before passing them in.
    4. Throw an exception (nooooooo!)
    5. [Edit Aug 2] Perform ALL of the matching operations. Assume the function is a decorator.
    6. [Edit Aug 2] Perform all of the matching operations and return a set of results. Assume the function returns results, plural, rather than one result.

Possible optimizations:

  • Inline the function calls.

These are not particularly new ideas. All of this has to be well tread ground.

[Edit Aug 2] Thoughts on "inline the function calls"

The comparator functions may be very simple and easily optimizable in theory. My preference is to write code to pass them in as a set and then let the compiler somehow produce code that has the simple comparison functions inlined as in the original example. This might be possible in theory if the functions are defined at compile time. The optimizer would need to be smart enough to unroll the loop and examine its contents and understand them.

If the functions are defined at run time, the optimizer would need to be part of the run time environment. It seems that what I want is the ability to arbitrarily optimize away function calls at runtime.

Saw the movie. Quick thoughts:

  • The movie opens with a lens flare. Is this a giant "fuck you" to Abrams's detractors? If so, well done.
  • The "Sulu Is Gay" controversy was bullshit. It was handled so subtly that there was nothing to have a controversy over.
  • The action scenes had way too much shakycam.
  • The movie overall was the best of the new series. That's not saying much but it was a fair way to waste two hours.

Plot hole: cut for plot holes )

So I'm doing this about once a year now. Read more... )

Page generated Oct. 24th, 2017 07:44 am
Powered by Dreamwidth Studios