Intro

The basics of targetting another platform are reasonably simple. Install the relavent target platforms using rustup followed my installing the required linkers.

The steps to cross compile from ubuntu -> windows are as follows.

Install the target with rustup using the following command

rustup target add x86_64-pc-windows-gnu

Once the download has completed, the linkers as can installed with the following command.

sudo apt install mingw-w64

With that out of the way you can now compile the lib/app with another target (in this case windows) using the following command

cargo build --target=x86_64-pc-windows-gnu --release

Overall the process was fairly painless once I found the right commands, though sadly that required a bit more digging than I would have liked.

RC1140

Intro

This post will give a short overview on how to deploy your app and subsequent updates using torrents. First some basics will be covered regarding how to setup a tracker followed up by creating a customized deployment client. The use of a customized client is simply to show deeper integration, though a normal torrent client would work just as well.

Deploying apps via torrents is not a new concept by any stretch and the likes of twitter have been doing this ages ago. While the project is no longer maintained, there is a more recent tracker that can be used which gives us the same result though everything is not packaged as nicely.

Requirements

  • Torrent Tracker
  • Torrent Client
  • Configuration update code
  • Management Service

Tracker Setup

Grab the tracker config

curl -L https://raw.githubusercontent.com/chihaya/chihaya/release-v1.0/example_config.json -o config.json

start a docker instance

docker run -p 6880-6882:6880-6882 -v $PWD/config.json:/config.json:ro quay.io/jzelinskie/chihaya:v1.0.2 -v=5

First Seed

Create a torrent file using the URL ( http://localhost:6881/announce ) as your announce URL. Note in this case the localhost means we are testing on the same host. If you want to seed or download the archive from a different host, replace localhost with either the hostname or IP.

Once the torrent file is created ensure that the torrent is seeded (either locally or on a remote host).

Distribution

You can now grab the grab the deployment archive with the original torrent file created in the previous step using your torrent client of choice.

Up till this point there is not that differs from normal torrent distribution. To make this process a bit more automated we can make use of a distribution service daemon.

The management daemon runs along side your application and watches a known end point for version changes, as soon as new version is published, the service can grab the latest torrent file and start downloading + seeding the archive. Once the archive is on the host it can continue with the usual upgrade process you may have to start running the new version by either forking to a deployment script or performing the steps internally.

Conclusion

The initial setup of the tracker is a once off cost. There after all that is required to distribute your archive/application is to simply seed your distribution archive and request it on each of the distribution end points either manually or in an automated manner.

RC1140

Soweto Marathon

Having completed the soweto marathon 21km last year and in addition to some prodding from my cousin I finally did my first full marathon this year. The race happened on the 6 Nov 2016 and it was definitely a milestone in my athletic adventures. I have been doing half marathons for a while now and kept putting of a full marathon because I figured it want much different than getting ready for a half marathon. After proving myself completely wrong I have to say I still enjoyed the race completely. The soweto is one of the harder marathons in jhb (and according to some in SA) and the race definitely showed me that I need to still up my game when it comes to running. I was originally planning on a 5 hour (or sub 5 if possible) but this unfortunately never happened. In the last 6kms of the race I lost my legs (there isn’t any other way i can explain that) and had to do short walk + trot sessions till the finish line. In the end I finished with a time of 5:22:44, in the end I am happy that I could even finish the race and will just use this as a way to set an easy personal best next time I do the race or another marathon. While I may have lost my legs at the end I was definitely not pushing nearly as hard as I could have as demonstrated by my crazy level of recovery over the next week.

Organization and general issues

The race organization was mostly good. The main issue really comes down to traffic on the day of the event and not enough marshaling around that. But once parked getting to the start line was easy and there were plenty of porta potties though I have come to not rely on them anymore.

The run

I did this run with my cousin who is significantly stronger and fitter than I am and even though he had never done a full marathon either, he definitely made the race more enjoyable. While we couldn’t talk the entire race (I can barely talk for 15mins so no way I could talk for 5 hours), the occasional pep talk as he pushed me forward and kept me engaged definitely made a huge difference to me getting over the finish line.

Running isn’t as technical as cycling so there isn’t as much to cover , but the hills towards the end of the race did hit me at the worst possible time.

I also ran with a hydration vest that I was used to training with and that I think I really needed since my timings were not in sync with the water stations and towards the end it helped more when stations were dry because I was so far back in the pack. I am not sure what caused it, but I also go quite nauseous at the end of the race (in sync with when I lost my power to run) and no matter much I drank I couldn’t get hydrated properly. This probably resulted in one of the worst feelings I can imagine (trying to run while feeling sick).

Conclusion

In the end this was a great race. I gave the race everything I had and while I could have possibly done better if I had trained harder ahead of time, I am more than happy with the time that I posted this year.

The statistics from my race can be found here

Overall

This was a unique book in how its presented. I did not originally know that it was two books combined in one and its really up to the reader to decide if they want to read them back to back or individually. Personally I feel they need to be read back to back since the books are pretty short overall and you end up feeling a little cheated with the completion of the first book not giving a big pay off.

The books were also quite different compared to what I generally look for a in a fantasy book. I prefer deep characters and interesting worlds, this book (the combination) had hints of that but in the end is actually a very light read. This book actually makes for a very nice read for people interested in the fantasy genre and are looking for something new to try. There is no burden to complete the entire series after having read one book as the build up is very gradual and you are never left feeling like you have to read the next book to get closure on the story , rather you feel like you want to read further to get a better grasp of the world.

Good

The characters in this book are quite unique and fun, they play to the classes they have been setup as which results in an enjoyable read since you have a basic grasp of what the characters are capable off without them needing to constantly display their amazing skills. The characters are presented as ‘elite’ characters, meaning they already have all their powers/skills and simply choose not to demonstrate these powers at all times. While they are powerful, it was good to see them being able to solve a number of situations through social interactions instead of overwhelming shows of power.

Bad

There isnt too much to fault the books on, there is a definitely a lack of depth to the books initially but this is slowly built up over time. The characters histories are touched on but never really fleshed out which does leave you wanting a bit more. While not something bad to me, many people may not enjoy the style of characters in the book which almost feel like they came straight out of an anime with some of their goofiness and mannerisms.

Conclusion

This is a great read if you want something quick and short with good amount of adventure, action and plotting. There is some extra depth to the book that I did not cover, regarding the different factions that are at play in the story. This faction wars probably pay of more the longer you read into the entire story arc. If you enjoy fantasy give this a read, you cant go wrong with it, but its not mistborn or other such similar books.

Things I hopefully will get to addressing one day :P.

Audiobooks. Discovery Duathlon. Rapid Miner. FreeBSD Jails. FreeBSD in general.