Pest Network Example MetaPost Figures


Recently in chat there was a link to MetaPost. I thought I would try it out, here is an example of some figures that I created with just a few minutes of tinkering to get an idea of how to use the program.


The Pest spec has been introduced as a replacement to tradional IRC, you can check it out over at One of the factors that impelled its development was the way that the traditional IRC protocol limits server arrangements to a "binary spanning tree", meaning you can link servers in chains, but the server chains cannot form cycles. For example, servers A, B, C, and D can be linked thus:


The problem that happens is whenever servers A and B lose their connection there is a "netsplit", where A and C can talk, and B and D can talk, but the two sides cannot talk together. Pest uses duplicate message elimination to allow the formation of cyclic networks, like the one shown below:


This way, if A and B lose their connection there is still communication between all members of the network.


This is the code I used to generate the figures above using MetaPost. I make no claim that this is the best way to do this, it is just an example of what the code for this looks like.

outputtemplate := "%j-%c.svg";
outputformat   := "svg";
beginfig (1);
  numeric u;
  u := 1cm;

  % Put in some labels
  label ("A", (0, 2u)) ;
  label ("B", (4u,2u)) ;
  label ("C", (0, 0 )) ;
  label ("D", (4u,0 )) ;

  % Connecting lines to show the network
  draw (0, .5u) -- (0, 1.5u) ;
  draw (.5u,2u) -- (3.5u,2u) ;
  draw (4u,.5u) -- (4u,1.5u) ;

  % Edges of labels are getting cut off, this is an ugly hack to
  % expand the picture a tad
  draw (-.5u,2.5u) -- (4.5u,2.5u) withcolor white;


beginfig (2);
  numeric u;
  u := 1cm;

  label ("A", (0, 2u)) ;
  label ("B", (4u,2u)) ;
  label ("C", (0, 0 )) ;
  label ("D", (4u,0 )) ;

  draw (0, .5u) -- (0,   1.5u) ;
  draw (.5u,2u) -- (3.5u,2u  ) ;
  draw (4u,.5u) -- (4u,  1.5u) ;
  draw (.5u,0 ) -- (3.5u,0   ) ;
  draw (.5u,.25u) -- (3.5u,1.75u) ;
  fill fullcircle scaled (2/5u) shifted (2u,1u) withcolor white ;
  draw (.5u,1.75u) -- (3.5u,.25u) ;

  draw (-.5u,2.5u) -- (4.5u,2.5u) withcolor white;





Question was asked, can the graph be made with arrows instead?

Answer: Quite easily. Just replace the edges, instead of draw, use drawdblarrow.

Updated figures:
layouts-11 layouts-21

From the Spam Trap


I just added a math spam filter (thanks for posting this, Asciilifeform!), I have not been getting spam frequently but since I do not post very often there was over 200 caught since the last time I looked.

Here is an interesting comment that got caught in the spam trap, it must be important since it was so long, right? I have no idea what it means though. And this is only the first little bit, maybe 10%, it just keeps going on and on like this!

find education summer camp

My page :: Finquiz Cfa Level 1 Mock Exam Finquiz Cfa Cfa Level 1 Summary Notes Finquiz Login Fin Quiz Cfa Level 1 Formulas Cfa Level 1 Mock Exam Pdf Free Cfa Level 1 Formula Sheet Cfa Curriculum 2020 Pdf Cfa Level 2 Mock Exam Finquiz Cfa Level 1 Mock Exam Finquiz Cfa Review Cfa Level 2 Syllabus Pdf Cfa Level 1 Books Pdf Cfa Level 2 Curriculum Pdf Free Cfa Study Material Cfa Level 1 Practice Questions Pdf Cfa Curriculum 2021 Pdf Cfa Level 1 Pdf Cfa Level 1: Essential Formulas All Cfa Level 1 Formulas Cfa Level 3 Mock Exam Cfa Level 1 Mock Exam Pdf With Answers Cfa Syllabus 2021 Pdf Free Cfa Level 1 Mock Exam Cfa Level 2 Mock Exam 2021 Pdf Cfa Level 1 Question Bank Free Cfa Level 1 Mock Exam 2021 Cfa Level 1 Notes Pdf Cfa Level 3 Notes Cfa Level 1 Mock Exam Free Cfa Level 2 Summary Notes Cfa Level 1 Mock Exam Pdf Cfa Level 2 Notes Cfa Level 1 Formula Sheet 2021 Finquiz.Com Cfa Level 1 Study Material Pdf Cfa Level 3 Curriculum Pdf Cfa 2021 Curriculum Pdf Cfa Mock Exam Cfa Level 1 Notes Schweser Cfa Level 2 2021 Free Download Cfa Level 3 Summary Notes Cfa Level 2 Mock Exam 2021 Cfa Mock Exam Pdf Cfa Mock Exam Level 1 Cfa Level 2 Mock Exams Cfa Level 2 Mock Exam Pdf Cfa Mock Exam Level 1 Pdf Cfa Summary Notes Cfa Level 2 Question Bank Free Download Pdf Cfa Level 1 Mock Exams Cfa Level 2 Curriculum 2020 Pdf Cfa Level 3 Practice Exams Cfa Level 1 Study Material Cfa Level 2 Formula Sheet Cfa Level 2 Question Bank Free Download Cfa Level 3 Mock Exams Cfa Level 1 Free Mock Exam Cfa Level 2 Study Material Pdf Finuiz Cfa Level 1 Question Bank Free Download Pdf Cfa Level 1 Question Bank Cfa Mock Test Free Cfa Level 2 Mock Cfa Level 1 Questions Bank Free Cfa Level 1 All Formulas Cfa Level 1 Summary Cfa Level 1 Free Study Material Cfa Level 1 Curriculum Changes 2021 Cfa Level 1 Free Mock Test Cfa Level 2 Question Bank Pdf Cfa Level 1 Formula Cfa Level 1 Books 2021 Pdf Cfa Mock Exam Free Cfa Formula Sheet Level 1 Cfa Level 1 Mock Exam 2020 Pdf With Answers Cfa Level 2 Curriculum Changes 2021 Cfa Level 1 Book Pdf Cfa Mock Exam Level 2 Cfa Level 2 Curriculum Free Download Cfa Level 3 Notes Pdf Formulas Cfa Level 1 Cfa Level 1 Question Bank Pdf Cfa Level 1 Curriculum Pdf Cfa Level 3 Pdf Cfa Pdf 2021 Cfa Level 1 2022 Curriculum Pdf Cfa Study Material Pdf Cfa Level 1 Material Pdf Cfa Level 1 Curriculum 2022 Pdf Cfa Level 1 Study Material Pdf 2020 Cfa Level 2 Practice Questions Pdf Cfa Level 1 Syllabus Pdf Cfa Level 1 Material Cfa Level 2 Practice Exams Cfa Formulas Cfa Level 3 Syllabus 2021 Cfa Level 2 Practice Exams Free Download Cfa Level 1 Mock Exam 2020 Pdf Cfa Level 1 Practice Questions Free Cfa Level 3 Formula Sheet Cfa Level 1 2022 Curriculum Pdf Download ข้อสอบ Cfa Level 1 Pdf Cfa 2021 Pdf Cfa Level 2 Mock Exam Free Cfa Level 1 Books Download Cfa Level 3 Question Bank Free Download Finquiz Mock Exam Cfa Level 1 Practice Exams Cfa Level 2 Practice Questions Cfa Level 1 Revision Notes Cfa Pdf Cfa Books Pdf Mock Exam Cfa Level 1 Cfa Level 2 Syllabus 2021 Cfa Curriculum 2022 Pdf Cfa Study Materials Free Cfa Level 3 Question Bank Cfa 2022 Curriculum Pdf Cfa Level 2 Formula Sheet 2021 Cfa Level Ii Mock Exam Free Cfa Mock Exams Level 1 Cfa Study Guide Pdf Cfa Free Mock Exam Level 1 Cfa Question Bank Cfa Curriculum Pdf Cfa Reading List Cfa Level 1 Syllabus 2021 Pdf Schweser Cfa Level 3 2021 Free Download Cfa Level 1 Mock Exam Pdf With Answers Free Cfa Level 2 Notes Pdf Cfa Level 1 Changes 2020 To 2021 Schweser Cfa Level 1 2021 Pdf Cfa Study Material 2021 Cfa Study Material Free Download Cfa Level 1 Curriculum Changes Cfa Level 3 Study Material Cfa Formula Cfa 2021 Curriculum Changes Cfa Book Pdf Cfa Level 1 2021 Curriculum Changes Cfa Notes Pdf Cfa Level 1 Curriculum 2021 Pdf Cfa Level 1 2021 Mock Exam Cfa Level 1 Download Mock Exam Cfa Level 2 Schweser Cfa Level 2 Practice Exams Pdf Free Cfa Level 2 Mock Exam Cfa 2020 Curriculum Pdf Cfa Level 1 2021 Pdf Cfa Level 2 Changes 2019 To 2020 Cfa Level 1 Books Free Cfa Material Download

A funny thing about Python


Python has a way to convert arbitrary data types to Boolean (True/False). For example, an integer of value 0 will be converted to False, while any other integer will be converted to True. Empty sets are converted to False, sets that contain things are converted to True. So here are a few examples, as shown in a REPL (read, evaluate, print, loop) session:

>>> bool(0)
>>> bool(1)
>>> bool(2)
>>> bool([])
>>> bool([1])
>>> bool([1, 2])
>>> bool(True)
>>> bool(False)
>>> bool('True')

These should all make sense. Now for the funny part. Observe the REPL output below, which seems to give the wrong answers:

>>> bool('False')
>>> bool([False])
>>> bool([[]])

Of course, the first one is True because the interpreter is just checking to see if the string is empty or not, and it does not care what is in the string. Similarly, in the second and third examples the interpreter is just checking to see if there is an empty set. The False and the empty set are each taking up space and so the sets are not empty.

Python does give a way to check arrays, using the any and all built-in functions. Some examples:

>>> any([False, False])
>>> any([True, False])
>>> all([True, False])
>>> all([True, True])

One place to be careful, though, is with empty sets. Observe the following:

>>> any()
Traceback (most recent call last):
  File "<pyshell#75>", line 1, in 
TypeError: any() takes exactly one argument (0 given)
>>> any([])
>>> any([[]])
>>> any([[[]]])

I included the first to show that there is an error if you do not supply any set at all. The second is an empty set, which returns false since it does not contain anything. The third one is false since the innermost empty set contains one empty set, which converts to False (as we saw above), while the fourth one has a set containing a non-empty set, therefore it is equivalent to any([True]), which returns the expected True as seen above.

The Sportsman's Antics


The day is spent in nervous anticipation.
As twilight falls, you move to your appointed place.
Darkness hides you, surrounds you,
A light beckons to you; a figure draws your attention.
Amid the roaring crowd you approach.
You size them up, they seem so familiar,
Each night a different person.
The crowds fade away,
The two of you are surrounded by a vast chasm.
You do the dance that is required.
Sweaty bodies clash, pushing, pulling.
Emotions run high, but it is merely for show,
All too soon it is over.
You walk down the dark and empty street,
Wearily, you head for home.


This poem was originally written in 2005 for a humanities class assignment, one of those things where you have to write a poem and then analyze your own poem. I happened to come across it while going through my old files, so I decided to keep it here.

Special Delivery by Kris Neville


I just read the book Special Delivery, by Kris Neville (originally published in 1951). This is an interesting science fiction story, where an alien race is secretly invading the Earth. These aliens have the technology to replicate anything from Earth, and their magnificent plan to soften up the Earth for the invasion amounts to mailing a stack of money to each and every person. Of course this works as the aliens intended: everybody gleefully takes the stacks of money. This leads to immediate shortages as people decide they don't have to work anymore, then rioting and pillaging as people try to get everything for themselves before it is all gone, and then general societal collapse.

Perhaps you can see where I am going here?

Recently in the US, due to the Covid Pandemic, there have been various "stimulus payments" and "increased unemployment payments" and "monthly child tax credits" which all amount to mailing stacks of money to the general public. We should be aware that we are playing with fire here. It seems like there are "help wanted" signs popping up everywhere. Inflation has gotten to the point that people are starting to notice it. There seem to be new shortages of seemingly random items each month. But throughout all this, nobody is stopping to ask the question of whether this is a good idea to hand out free money to everybody, they just keep asking for more! Instead, the media is embroiled in covering the nitty gritty of who picks which side in the manufactured controversy of who "believes in science" more, whether it is the Team Red or the Team Blue and whether they will mandate masks or vaccines or forbid mandates of one or the other, all while breathlessly calling the other side names and completely ignoring the sinking ship of the economy as it tips over the brink of disaster.

The new and improved Scoopbot


So I threw together an IRC bot (sig) for monitoring RSS feeds and announcing when new blog posts show up. A few years ago I had made one of these, but I seem to have misplaced the library it used for parsing RSS feeds. I started with the IRC bot structure found in Watchglass. I built a little function to pull out the stuff I wanted from the RSS feeds, so now I don't need that external library anymore.

Currently it just announces to all channels anything in the blog list. In the future I want to alter it so that it can take PM's to subscribe individually to feeds. If you have other ideas, please comment below. I also appreciate critiques of my code, whether it is something that I could have done more efficiently or if there is something that is just plain dumb.

Update: Had to change the program a little, I moved where it speaks the posts to a part of the loop that actually gets hit; it was hidden behind a 'continue' previously. Also changed the logic for storing the recent feeds to hold a few recent posts instead of just one, so that if the most recent post is deleted the program will still recognize the older posts and not report them as new.

Update 2: Added blog titles to the information parsed from the RSS and reported to IRC. Patch scoopbot_add_titles.vpatch (sig)

Overview of the Paleo Diet


The other day I cam across an article about nutrition, and they quoted some guy who had spent time studying a hunter-gatherer society in Africa. This part got me thinking:

If you go out and have a chance to live with a group like the Hadza, you realize that a lot of the stories we tell ourselves about the past, including things like the paleo diet, just kind of fall apart. So there's this idea in the paleo diet world that there's one sort of single natural human diet, and that diet was very meat heavy, hardly any carbs at all and certainly no sugars.

[In reality] the Hadza have a mix of plants and animals in their diets. It changes day to day and year to year, but about half of the calories are coming from plants.

Clearly this guy does not understand what the Paleo Diet is. He has just summarized the Paleo Diet while trying to debunk it. The Paleo diet is not like the Atkins or South Beach diets where you drop everything except meat and then snobbily lecture your friends about your amazing diet while snarfing two pounds of bacon. Instead, the paleo diet focuses on a balance of a small amount of lean meat with an abundance of fruits and vegetables.

A while ago my wife and I went through learning the paleo diet, and more than any particular rules about eat this and not that, it was beneficial for changing the overall way we approached eating and menu planning. Before we studied the paleo diet, if we were at home and hungry and wanted something quick, we would throw on a pot of pasta, cover it in butter and call that dinner. Now, I realize that there are so much better things to eat, both in leaving you feeling better when you are done and also just having better flavors.

So here is a quick summary of the paleo diet:

  • Avoid processed foods - eat fresh stuff.

  • Avoid eating out, cook things yourself.
  • Consume a small to moderate amount of lean meats. Things like fish, a 4 oz steak (not a 24 oz steak), or a grilled chicken breast (not breaded and fried grease bomb with a bit of reconstituted chicken in the center).
  • Eat lots of vegetables, and use a wide variety.
  • Moderate amounts of fruits, berries, and nuts; these are great for adding in more flavors and variety to various recipes.
  • Low or no dairy (some people say none at all, some people say limit to small amounts) - this is one where it helps to do a "cleanse", go a few weeks or a month without it and see how you feel. It is widely documented citation needed? that some populations (like most Europeans) have a gene that allows them to process dairy while other populations (like most Asians) lack that gene and are therefore lactose intolerant, but humans have a tendency to be migratory and promiscuous so you might not be in the group that you think. In other words, try going without dairy and see if you feel a huge difference.
  • Most paleo guides say "no bread" or even "no grains", but this is one where I tend to temper it down to using moderation and less processing. So it is better to use brown rice instead of white rice, and whole grain bread instead of cheapo white bread. Corn-on-the-cob is great, a corn chip (like a Cheeto) is not so good.
  • Eggs are good too.

Overall, using the paleo diet is about rejecting the "progress" that has happened to food, where we are constantly being sold something more bland than we had before. While industrialized agriculture allows growing a huge amount of high fructose corn syrup, and that gives people the food energy they need to live, it does not give the vitamins and minerals that you need to live healthy. I recently saw a commercial for a liquid food replacement named "huel", which to me sounds like a portmanteau of hurl and gruel. Part of me wanted to hurl, part of me wanted to ask if this is some sort of sick joke, and part of me is curious to see who the hell would want that sort of garbage?

The Simple Diet

Somewhat related, I once went through a list of all the vitamins that people need, and made a list of the types of foods that provide each vitamin. Working on the premise that your body knows when it is missing something and so you will be hungry until you fill that need, my hypothesis is that eating something out of each of these categories will help you be healthier and avoid that craving which induces overeating. So here are the categories:

  • Green (leafy) vegetables, such as spinach, broccoli, kale

  • Colorful vegetables, such as carrots, peppers, sweet potatoes
  • Fruits
  • Meat and eggs
  • Whole grains
  • Beans and nuts
  • "Good oils", things like olives, avocados, and fish

So the idea is that if you focus on making sure you get at least a little bit from each of these categories you don't have to count any calories or anything, your body will just have access to the things it needs and you will be healthier.

US VP Debate 2020


I suppose since I wrote up a review of the first presidential debate I should continue with what happened at the vice-presidential debate as well.

The current vice president, Mike Pence, squared off against the Democrat challenger, Senator Kamala Harris of California. Unlike the presidential debate, this one was mostly civil. More often than not, Pence continued talking long after his time was up, but at least there was no shouting at each other. In fact, they might have gone too far the other direction; there was so little energy that it was fairly boring.

The biggest thing that stuck out to me was that both candidates, but especially Harris, did not always answer the questions asked. There were a couple times where it seemed like Harris hadn't prepped for a certain question, so she just went ahead and answered a different question that she wished they had asked.

The topics covered were very similar to those covered in the presidential debate, so much of this one felt like a rehashing of the same talking points, just from a weaker point of view ("my guy is going to do ..." instead of "I am going to do ..."). The topic of whether the Democrats would try adding extra supreme court justices was again asked, and again the Democrat refused to address the question. Isn't that why we have the debates, so people know where you stand on issues? Why would they refuse to answer the question, unless they don't think voters would like the answer they give? What a non-answer should tell you is that voting for this guy would give you the opposite result of what you want - left-wingers should proceed as if she said "Our supreme court has had nine members for hundreds of years, we are not going to change it", and right-wingers should proceed as if she answered "We are going to nominate five of the most liberal judges we can find on our first day in office".

So instead of answering the question asked about the supreme court, Harris said something like "You want to talk about court packing, of the 30 federal judges appointed to life-time positions by this administration not a single one of them was Black!". Now, Pence did not really get a chance to answer, but it only takes a second to remember that on the current Supreme Court there is only one Black guy, and he was nominated by a Republican. Would Harris have been satisfied if a clone of Clarence Thomas had been nominated to the Appeals court? Furthermore, unlike Biden, Trump has published a list of people he would consider nominating to the supreme court, and it does include a couple Black guys.

The way the debate was formatted did not allow a lot of conversation between the candidates, but over the course of a couple questions this general back-and-forth happened:

Pence: The Trump administration passed a tax cut that saved the Average American Family1 $2000 per year on income taxes.
Harris: On day one of the Biden administration we are going to repeal the Trump tax cuts2.
Pence: There you have it, she said they are going to raise taxes.
Harris: I never said that!
Pence: You just said you are going to repeal a tax cut, which is the same as passing a tax increase.
Harris: Under a Biden administration taxes will not go up for anybody making under $400,000 a year.

Wait, where did we suddenly pull the number $400,000 from? Is that supposed to be the top of the middle class or something? I seem to remember Barak Obama promising not to raise taxes on anybody making below $250,000, and even then I thought the number was a bit on the high side. I guess that is inflation for you.

One interesting thing I noticed was the way the VP candidates referred to their presidential candidates. Pence always called him "President Trump", as if trying to emphasize his current position, perhaps to build up the image of a respectable person that voters could more easily support than the boorish name-caller that we saw on display during the last debate. Harris, on the other hand, was constantly calling her running mate "Joe", as if the playbook from their campaign is to emphasize his down-to-earth persona, somebody you could have a beer with, as they say. Marketing, it's all just marketing.

Overall, I would say that both candidates came across as sleazy politicians who play loose with the facts, but I disliked Harris more. For as much as she was touted as a former DA who could handle herself in a debate, she was underwhelming and fell far below my expectations. Pence came across as the kind of guy who has convictions and will go ahead and quietly do whatever it is that he wants to do (a stark contrast to the president, who picks random directions of travel but does it as loudly and crassly as possible).

  1. This mythical family of four makes something like $100,000 a year. []
  2. Nevermind that the president can't actually do that, it would take an act of Congress to change the tax code, but people running for president usually ignore that fact. []

Sad rant from a horny teenager


The other day I was driving with my teen-aged daughter who was in a sad, weepy mood. I asked her what was bothering her. She started to sob and said to me "I am so stressed because I am so horny all the time. I see a cute boy and my body says 'I would fuck that', but I don't even know how to fuck!" Sob, sob, sob ...

This is the same daughter who struggles with tampons because, as she says, "I know it's supposed to go in my vagina, but I can't figure out where my vagina is."

The struggle is real.

US Presidential Debate 2020-1


Donald Trump and Joe Biden, the two candidates for president nominated by the US duopoly held a debate last night. "Minor candidates" were pointedly not invited. If you didn't watch it you did not miss much. There was a lot of shouting, interrupting, and name calling in between most of the same talking points that are spouted by anonymous commenters on the internet.

The two men are quite old, but overall Biden looked more affected by age, where he would sometimes struggle to remember something. Biden also has a much slower way of talking, almost like he knows he doesn't have much to talk about and so talks slow to use up all the time on one idea. This might be the election where the VP choice is the most important, Donald Trump is already the oldest US president, and Joe Biden is even older.

The tone of the debate was not so much a serious presidential forum, but more like two trolls in an internet comment section going back and forth and arguing over each other. For example, the zingiest comeback of the night:

Biden: "First of all, my opponent does not know what he is talking about, and number two -"
Trump: "You're a number two."

There were a lot of loaded questions of the form: "Mr. Trump, given the fact that (leftwing talking point) why should voters listen to you?", and "Mr. Biden, since it is true that (rightwing talking point) how will you handle things?", which many times led to the moderator never actually finishing the question because the candidates wanted to jump in and challenge the assumptions he was loading into each question. The moderator should have just stuck to questions to prompt the debate, not interjecting his own point of view into it. The moderator also did a poor job of getting the candidates to not talk over each other.

Trump spent the night talking to the people in the room with him, Biden and the moderator, which seemed natural. Biden, on the other hand, took several moments to look into the camera and try to talk directly to the people watching. It came across as uncomfortable and slightly condescending, like he was trying to tell me what I was supposed to believe.

There were a few questions that each candidate sort of dodged or only answered vaguely before moving on to their own pet topics, but there was one question that stood out where Biden actually refused to answer the question. The topic was the Supreme Court, and the moderator asked something like "Some on the left have suggested 'packing the court', adding additional justices, would you do that if you were elected?" and Biden flatly refused to address the topic. Trump then asked him who he would pick, where is his list (Trump has published a list of possible judges to pull from for the Supreme Court, which was one thing that got some of his less enthusiastic supporters on his side, they figured they at least knew what sort of judges he would appoint) and Biden basically ignored the challenge.

Overall, I would say Trump won this debate. He came across as more lively, more in command of his facts, and more assertively executive. He may have said some things that were not true, but he sounded like he believed every last one of them and you should too. Biden seemed to be trying to take credit for anything good that happened during the Obama administration, but everybody knows the VP pretty much does nothing so the brags sounded hollow.