31 Dec 2019

Reducing our size for space exploration

History / Edit / PDF / EPUB / BIB / 3 min read (~487 words)

Is reducing our size a viable alternative/approach to space exploration?

I don't have enough knowledge of physics to determine all the impacts that scaling ourselves down would have. There are a few things I would consider, such as:

  • the impact on being launched in space
    • do we need less energy?
    • are there other means to get us in space if we're smaller?
  • our ability to accelerate/decelerate in space
    • what kind of technology can we use?
  • our ability to send communication signals back on earth
    • given our small size, how can we produce enough power for the signal to be received?
  • are there physical phenomenons that we need to take into account due to our reduced size?

When I asked myself this question, I was reading Accelerando, where a crew is sent far in space in a "can". I always perceived it as being the size of a soft drink can and I thought that was an interesting idea. In the book they are not shipping human beings, but rather a simulation of their consciousness. In other words, they're sending an AI in a can™. I've also thought of this as explaining why we've never been visited by aliens. Maybe one of the steps in evolution or progress is that we are able to scale ourselves down so that we are not as visible as we currently are. Imagine being an ant colony instead of the human society, our footprint would be a lot less noticeable from outer space. Furthermore, if you were to travel in a can, it would be a lot more difficult to detect you than if you were travelling in an extremely large ship.

The benefit I could see from being able to reduce the size of our satellites or vessels is that less mass is required to be turned into a spacecraft, which could allow us to create many more spacecrafts for the same amount of materials.

This question is also reminiscent of movies like Honey, I shrunk the Kids, Downsizing, Ant-Man or even a recent Rick & Morty episode. They explore the differences between full and miniature scales.

20 Dec 2019

Quantum computing

History / Edit / PDF / EPUB / BIB / 3 min read (~459 words)

$$ \left| 0 \right> = \begin{pmatrix} 1\\ 0 \end{pmatrix}$$

$$ \left| 1 \right> = \begin{pmatrix} 0\\ 1 \end{pmatrix}$$

  • Quantum computers only use reversible operations
  • Identity and Negation are reversible
  • Constant-0 and Constant-1 aare not reversible

$$ \begin{pmatrix} x_0\\x_1 \end{pmatrix} \otimes \begin{pmatrix} y_0\\y_1 \end{pmatrix} = \begin{pmatrix} x_0 \begin{pmatrix} y_0\\y_1 \end{pmatrix}\\x_1 \begin{pmatrix} y_0\\y_1 \end{pmatrix} \end{pmatrix} = \begin{pmatrix} x_0y_0\\ x_0y_1\\ x_1y_0\\ x_1y_1 \end{pmatrix}$$

$$ \begin{pmatrix} 1\\2 \end{pmatrix} \otimes \begin{pmatrix} 3\\4 \end{pmatrix} = \begin{pmatrix} 3\\ 4\\ 6\\ 8 \end{pmatrix}$$

  • This tensored representation is called the product state

$$ \left| 00 \right> = \begin{pmatrix} 1\\ 0 \end{pmatrix} \otimes \begin{pmatrix} 1\\ 0 \end{pmatrix} = \begin{pmatrix} 1\\ 0\\ 0\\ 0\\ \end{pmatrix}$$

$$ \left| 01 \right> = \begin{pmatrix} 1\\ 0 \end{pmatrix} \otimes \begin{pmatrix} 0\\ 1 \end{pmatrix} = \begin{pmatrix} 0\\ 1\\ 0\\ 0\\ \end{pmatrix}$$

$$ \left| 10 \right> = \begin{pmatrix} 0\\ 1 \end{pmatrix} \otimes \begin{pmatrix} 1\\ 0 \end{pmatrix} = \begin{pmatrix} 0\\ 0\\ 1\\ 0\\ \end{pmatrix}$$

$$ \left| 11 \right> = \begin{pmatrix} 0\\ 1 \end{pmatrix} \otimes \begin{pmatrix} 0\\ 1 \end{pmatrix} = \begin{pmatrix} 0\\ 0\\ 0\\ 1\\ \end{pmatrix}$$

$$ \left| 4 \right> = \left| 100 \right> = \begin{pmatrix} 0\\ 1 \end{pmatrix} \otimes \begin{pmatrix} 1\\ 0 \end{pmatrix} \otimes \begin{pmatrix} 1\\ 0 \end{pmatrix} = \begin{pmatrix} 0\\ 0\\ 0\\ 0\\ 1\\ 0\\ 0\\ 0\\ \end{pmatrix}$$

$$ C = \begin{pmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 0 & 1\\ 0 & 0 & 1 & 0\\ \end{pmatrix}$$

$$ C\left| 10 \right> = C \begin{pmatrix} \begin{pmatrix} 0\\ 1\\ \end{pmatrix} \otimes \begin{pmatrix} 1\\ 0\\ \end{pmatrix} \end{pmatrix} = \begin{pmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 0 & 1\\ 0 & 0 & 1 & 0\\ \end{pmatrix} \begin{pmatrix} 0\\ 0\\ 1\\ 0\\ \end{pmatrix} = \begin{pmatrix} 0\\ 0\\ 0\\ 1\\ \end{pmatrix} = \begin{pmatrix} 0\\ 1\\ \end{pmatrix} \otimes \begin{pmatrix} 0\\ 1\\ \end{pmatrix} = \left| 11 \right>$$

19 Dec 2019

Python profiling

History / Edit / PDF / EPUB / BIB / 1 min read (~117 words)

Run your program with python -m cProfile -o profile.cprofile my-script.py

Install pyprof2calltree to convert the cprofile to a kcachegrind compatible profile.

pyprof2calltree -i profile.cprofile -o callgrind.profile.cprofile

16 Nov 2019

RFC

History / Edit / PDF / EPUB / BIB / 2 min read (~376 words)
  • Keep all RFCs under a single location
  • Uniquely identify RFCs
  • Use a shared template
    • Editor: Name <email>
    • Status: Draft/Review/Approved/Abandoned/Implemented
    • Required approvers: Name <email> (why), Name <email> (why), ...
    • Approvers: Name <email> (date), Name <email> (date), ...
    • Created on: <date>
    • Updated on: <date>
    • Background
    • Problem
    • Solution
    • References: Documents/URLs that can be useful to consult
  • If a RFC is abandoned, the reasons why should be made explicit in the document

05 Oct 2019

Investing

History / Edit / PDF / EPUB / BIB / 2 min read (~326 words)

Note that most of the process is guided by a long term investment strategy. In other words, we expect to keep the assets we purchase for as long as possible, only selling to rebalance our portfolio.

  • Do not put all your eggs in one basket (stock), diversify.
  • Use indexes to determine which stocks to buy.
  • Start small (10% of what you want to invest in total) and do not invest everything at once, learn from your mistakes.
  • Do not sell when your stock drops, as it will drop in value at some point while you're holding it
  • When you start, there will be a period of time where some of your stocks value will go into the negative. Ignore it and wait a few months before deciding whether to part from it or not.
  • Pick stocks with good $R^2$ score and positive slope.
    • The idea here is that we want to invest in stocks which have shown to be highly predictable in the past, while also displaying linear growth (as such, this is not a useful indicator for stocks which have explosive growth).
  • Invest some percentage of the portfolio in stocks which provide regular dividends, this is to replace holding "high yield" saving accounts.
    • Opt to invest in REIT, which will offer monthly dividends as well as attractive growth in their value while you hold them.
  • If you want to keep things simple for yourself, buy ETFs.
    • VFV.TO is an ETF that tracks the S&P 500 in CAD and has a low expense ratio.
  • Compare your portfolio's performance against indexes.
    • If you perform more poorly than indexes over 6 months/1 year, sell the stocks you have and buy the index you compare against.