Tristan Sweeney

← Back to blog

Finals, Deluge, and mutable constness

Published on 2018-6-23 by Tristan Sweeney

Foo
Can't believe it's been over a week since I last wrote a post. I'm mid finals, so it's a quick touch-back. I paid for Plex on Google Play, bought a new hard drive, and loaded up a ton of songs so I can have my own mini Spotify on the fly.

Can’t believe it’s been over a week since I last wrote a post. I’m mid finals, so it’s a quick touch-back. I paid for Plex on Google Play, bought a new hard drive, and loaded up a ton of songs so I can have my own mini Spotify on the fly. I also configured Deluge-Web to auto-connect to the local daemon, without doing so it won’t work on my mobile app until I use the web ui to connect it for the first time. I also learned about the mutable keyword in C++, which tags object fields, denoting that a const can modify it freely. This was useful for a Getter in a project I was using that had O(n) runtime to generate a single int. (I suppose I could generate it at compile time but where’s the fun in that). A single mutable std::option<int> val; stored the result, and the getter would conditionally run the calculation if val.has_value() was false. Pretty nifty.

Written by Tristan Sweeney

← Back to blog
  • Favicon Fun

    9/17/2024
    Favicon Fun
    photo by Astro

    I love the Astro homepage favicon effect, and replicated it on my site.

  • Ransom Note

    5/3/2020
    Ransom Note
    photo by Jamie Eckle

    Given the text for a ransom note, determine if enough letters exist in a magazine to create it.

  • Breaking down Subsum Equals K

    4/29/2020
    Breaking down Subsum Equals K
    photo by Meghan Vestal

    given an array of integers, find the number of continuous subarrays equal to `k`.

  • Revivifying the Blog

    4/11/2020
    Revivifying the Blog

    I recently had a friend come across my blog, and was promptly shamed for having a certificate more out of date than the VCR. Such an embarrassment couldn't rest, and so I cleaned up my act a bit.

  • Apt install on a Disconnected Wireless System

    6/8/2018
    Apt install on a Disconnected Wireless System
    photo by Google

    I just was installing ubuntu on a platform that only has wireless capabilities, and decided to install the server edition to minimize overhead / avoid having an X server + desktop environment to disable. Woe, the server edition of Ubuntu ships with no wireless utilities, because nobody in their right mind would run a wireless server.

  • Let's Encrypt HTTPS on DD-WRT

    6/5/2018
    Let's Encrypt HTTPS on DD-WRT
    photo by DD-WRT

    I run a DD-WRT router on a Netgear WNDR4500 router. It's been in my life since I can remember, and came along with me to college. A while back I loaded the DD-WRT firmware onto it, and it's been serving like a champ ever since.