- Make sure you have Emacs with treesitter support:
M-:(treesit-available-p)RETshould returnt - Make sure you have installed python treesitter grammar
| import cityhash | |
| class Cell: | |
| """A cell in the Invertible Bloom Filter.""" | |
| def __init__(self, index, ibf): | |
| self.index = index | |
| self.item_sum = 0 # Now just a single integer instead of array | |
| self.hash_sum = 0 # Store hash sum separately for verification | |
| self.count = 0 | |
| self.ibf = ibf |
I've been fiddling about with an idea lately, looking at how higher-kinded types can be represented in such a way that we can reason with them in Rust here and now, without having to wait a couple years for what would be a significant change to the language and compiler.
There have been multiple discussions on introducing higher-ranked polymorphism into Rust, using Haskell-style Higher-Kinded Types (HKTs) or Scala-looking Generalised Associated Types (GATs). The benefit of higher-ranked polymorphism is to allow higher-level, richer abstractions and pattern expression than just the rank-1 polymorphism we have today.
As an example, currently we can express this type:
What I did to get Python 3.4.2 on Ubuntu 14.04. The stock version of Python 3 on Ubuntu is 3.4.0. Which is missing some of the best parts! (asyncio, etc). Luckily I discovered pyenv which solved my problem.
Pyenv (not to be confused with pyvenv) is the Python equivelant of rbenv. It lets you configure which Python environment/version is available per directory, user, or other session variables.
I followed the instructions here to install pyenv in my home directory. Verbatem, those instructions are:
sudo apt-get install git python-pip make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev