I hereby claim:
- I am matthewjberger on github.
- I am matthewjberger (https://keybase.io/matthewjberger) on keybase.
- I have a public key whose fingerprint is 6314 2AE2 EB04 8B8F 56EA 69FA 5A0D 1012 B518 A821
To claim this, I am signing this object:
* root topic - TAB and S-TAB to toggle folding | |
** child topic | |
child topic text | |
*** leaf topic: | |
some text blah | |
blah | |
blah | |
*** another leaf topic: | |
# test table - TAB to cycle through columns, M-e to move point to end of cell |
I hereby claim:
To claim this, I am signing this object:
tl;dr: Avoid Box<T>
in general.
Actually, this rule is so important that the Rust Pointer Guide explicitly says the same. Therefore without a further ado, you should avoid Box<T>
except for these three cases:
When you absolutely need a trait object (Box<Trait>
). But review carefully to see if it is indeed absolutely needed; you may try to generalize things too far, for example.
When you have a recursive data structure. This may be mandatory when you have an inherently recursive data (e.g. scene graph), but it may also be a sign of the premature optimization. Again, review carefully to see if you need to write a separate data structure yourself, and use the collection
crate if possible.
#!/bin/bash | |
# Credits to: | |
# - http://vstone.eu/reducing-vagrant-box-size/ | |
# - https://github.com/mitchellh/vagrant/issues/343 | |
apt -y purge ri | |
apt -y purge installation-report landscape-common wireless-tools wpasupplicant ubuntu-serverguide | |
apt -y purge python-dbus libnl1 python-smartpm python-twisted-core libiw30 | |
apt -y purge python-twisted-bin libdbus-glib-1-2 python-pexpect python-pycurl python-serial python-gobject python-pam python-openssl libffi5 |
If you have a huge repository (in size and in history) and want to add a subfolder | |
to your project as a submodule you can follow this example to save time and space | |
using git's shallow clone and shallow checkout feature. It is a bit more complicated | |
in this example because I assume that you want your submodule to track a non-default | |
branch, called `mybranch`, instead of the `master` branch. Things could probably get | |
a lot simpler when using the default branch. After following the commands in these | |
examples you can use `git submodule update` and `git submodule update --remote` as normal. |
// Place your settings in this file to overwrite the default settings | |
{ | |
"editor.fontFamily": "Hack", | |
"editor.fontSize": 18, | |
// Specifies path to /src directory of local copy of Rust sources | |
"rust.rustLangSrcPath": "C:\\Users\\Matth\\Home\\rust\\src", | |
"vim.easymotion": true, | |
"vim.incsearch": true, |
{ | |
// Use the hack font | |
"editor.fontFamily": "Hack", | |
// Font size | |
"editor.fontSize": 18, | |
// Tabs are equivalent to this many spaces | |
"editor.tabSize": 4, |
#include <iostream> | |
#include <map> | |
using namespace std; | |
class BaseClass{ | |
public: | |
virtual int funk() { | |
return 0; | |
} |
#include <iostream> | |
#include <map> | |
using namespace std; | |
class BaseClass{ | |
public: | |
virtual int funk() { | |
return 0; | |
} |