HNHacker News
TopNewBestAskShowJobs

chriswitts

36 karma · joined November 2, 2011

[ my public key: https://keybase.io/christianwitts; my proof: https://keybase.io/christianwitts/sigs/IPrtqfZaMKB0oQhj5rX0GDLl7PwOpTlvpHpuAIuE-Gc ]
submissionscomments
chriswitts··on Raven – CI/CD Security Analyzer
PyGithub has existed for ages, even if it is not official. GitHub only maintains octokit for JS, Ruby, .NET, and Terraform.
chriswitts··on Wedding Photographer Says More Clients Are Requesting Blurry Pictures
From the article

  “Most of the time in a wedding gallery of 1,000 photos there are only 1 to 3 images that are blurred,” explains Haanstad. “Also, anytime I do a blurry photo I have the couple do the same thing but in focus so the couple has both images and is not missing out on a moment from their wedding day.”
chriswitts··on Roblox sued for allegedly enabling young girl’s sexual, financial exploitation
They are. It is stated in the subheading, as well as the article.
chriswitts··on Would senior engineers be interested in working reduced hours or part time?
Absolutely yes. I would be pretty happy to work 20 hours a week to essentially be a consultant and advisor to a team.
chriswitts··on Teen Cyber Prodigy Stumbled onto Flaw Letting Him Hijack Teslas
The software was not named in the article, as it has yet to be patched.

  Colombo provided screenshots and other documents detailing his findings and
  identifying the maker of the affected third-party software, but he asked 
  that Bloomberg not publish specifics because the flaws hadn’t yet been fixed.
chriswitts··on Omicron – Is this the end of the pandemic?
What the tweet and graph misses is the fact that the NICD systems have a delay in reporting due to some recent IT changes for data security. https://twitter.com/nicd_sa/status/1469405508679483395
chriswitts··on $70 pricing is coming to PC, starting with Square Enix’s next games
I hope they correct the Steam regional pricing for Forspoken... $70 is ZAR1,118.53 (R15.98:$1) yet the Steam SA pricing is R1,429 (±R20:$1, or effectively a $90 game). Definitely not going to buy something so ludicrously priced.
chriswitts··on AT&T lobbies against nationwide fiber, says 10Mbps uploads are good enough
I'm in South Africa, paying ±$73/month for 100Mbps synchronous uncapped (but with a FUP [Fair Usage Policy]). I would love to double my speed and third my costs :(
chriswitts··on The Rapier Physics Engine
As a native English speaker I can attest that we sure as shit don't pronounce it "Rapey".
chriswitts··on Linus Torvalds has switched to AMD
AMD calls it SMT (Simultaneous MultiThreading).
chriswitts··on Microsoft Open-Sources GW-Basic
You can arbitrarily amend the date in git

  git commit --amend --date="Thu Jan 1 08:00 1970 +0000"
chriswitts··on Show HN: Free Dividend Watchlist/Portfolio
I like this, it suits my needs.

I noticed that VOO (Vanguard S&P 500 ETF) has a -10.56% dividend percentage listed (although it is the YTD performance) which causes the expected annual dividend to go negative. The yield is currently listed at 1.98% on Yahoo Finance.

chriswitts··on Show HN: I wrote a book for engineers that want to become engineering managers
Yes, the betas get updated along the way, and you'll end up with the final print version when it's done.
chriswitts··on Benchmarking shell pipelines and the Unix “tools” philosophy
You shouldn't be using `#!/bin/bash` but rather `#!/usr/bin/env bash` instead.
chriswitts··on Effects of short-term fasting on cancer treatment
Empirically speaking 4/4/9 calories per gram of carb/protein/fat. So generally speaking no, 1lb != 3,000 calories.
chriswitts··on One Program Written in Python, Go, and Rust
You can use Hyperfine [1] instead of time for a nicer CLI benchmark.

I'd also be curious to know is pillow-simd [2] gets the Python performance closer to Go/Rust, and if using Rayon [3] and changing your .iter()'s in your Rust code to .par_iter()'s will yield an improvement there.

[1] https://github.com/sharkdp/hyperfine

[2] https://github.com/uploadcare/pillow-simd

[3] https://github.com/rayon-rs/rayon

chriswitts··on Is C++ fast?
You could check out Nanolog [1] for inspiration.

[1] https://github.com/PlatformLab/NanoLog

chriswitts··on Tweetable Python – Tweetable Python 3.7 Documentation
I have a little function for generating some random characters

    ######################################
    # Generate a random password from /dev/urandom
    # pw [length [num_passwords [characters]]
    # Arguments:
    #   $1 => The length of password
    #   $2 => The number of passwords to generate
    #   $3 => The acceptable character set, PCRE regex
    ######################################
    function pw {
        if [[ "x$1" == "x-h" ]]; then
            echo "Usage: pw [length:20 [num_passwords:1 [character_set:a-zA-Z0-9._!@#$%^&*()]]]"
        else
            LC_CTYPE=C \
                tr -dc "${3:-'a-zA-Z0-9._!@#$%^&*()'}" < /dev/urandom \
                | fold -w "${1:-20}" \
                | head -n "${2:-1}"
        fi
        # There's always `openssl rand -base64 12` for simplicity
    }
chriswitts··on Open Source Week, South Africa [8-14 October]
As someone who helped organise last years PyConZA, and has been watching this years conference develop, I am super excited to see that we've finally managed to have an entire dedicated week for a variety of OSS technology.

The amount of effort the organising committees have put in so far has been stellar, and it's going to be a great year.

Also expanding the PyCon tracks to include a dedicated PyData track is fantastic.

chriswitts··on Deere suit sheds light on race for $240B farm tech market
Thanks for that, it's also blocked in South Africa, which is pretty damn far from Europe. I suspect they just block anything non-NA.
chriswitts··on People are recycling too much garbage, and it's threatening the industry
We have a shop called Nude Foods [1] in Cape Town that is setup like that. They unfortunately don't do meat, but most everything else is covered.

[1] http://nudefoods.co.za/

chriswitts··on Ask HN: What books are you currently reading?
Just finished in the last week:

- What a wonderful world by Marcus Chown

- 47 Ronin by Joan D. Vinge

- Practical Monitoring by Mike Julian

Currently reading:

- The Four by Scott Galloway

- The Art of Capacity Planning 2nd Edition by Arun Kejariwal, John Allspaw

chriswitts··on Cape Town Is 90 Days Away From Running Out of Water
First off, I'm surprised that the taps don't just go dry after 87 liters; perhaps the tech isn't there.

Census data is inaccurate, and you have no concrete figures on the number of people per residence. Even if we had the tech (the new water meters we have are a step in the right direction, except when they break which is often and also maintained by quite a number of different contractors) you'd be hamstrung needing to ascertain correct figures per location. And then throw in all the apartment blocks in Cape Town, which all have a singular water main and meter, it becomes even harder (because do you punish all people in the block because one person is having a bath three times a day).

I hope you find a way to manage (rain, desalination, hopefully something comes online soon)

The local government has sadly mismanaged the situation terribly, for more than a decade. We're not going through a drought, we're experiencing a water shortage. The total population for the City of Cape Town (more than just Cape Town itself, it includes the surrounding areas) has been rapidly expanding over the last 15 years (more so in the last 5) due to semigration (people moving from other provinces, mainly Gauteng, due to the better quality of life in the Cape), and the underlying infrastructure has not been upgraded in step with the population growth. We have had warning since as early as 2007 (from official reports I'm aware of) that we needed to move forward with new water programs including desalination plants in order to accommodate for the growth.

We have a desalination company, GrahamTek [1], which had put forward tenders which could have brought in 450ML water a day within 18 months, but were largely ignored by the powers that be.

[1] https://www.iol.co.za/weekend-argus/news/city-of-cape-towns-...

chriswitts··on Ask HN: Do you use FreeBSD as web server? Why or why not?
DigitalOcean does as a droplet. Linode does offer it as well, but currently afaik it's not fully supported so their automated backups don't work, which can be solved with zfs snapshots and sending them to your own backup instance.
chriswitts··on Nginx has been removed from Debian Stable
`Package: nginx (1.6.2-5)` is there just fine for me in Jessie and `1.9.6-2` in Sid.
chriswitts··on Teach Yourself Go in 24 Hours
8 'pages', and a waste of time. Good thing I paid $0.00 for it to check out.
chriswitts··on Adding Digits in Python (or Smarter-looking doesn't mean better)
Surprised you didn't have `sum(map(int, number_string))` in there.

  In [5]: def f(x):
     ...:     x = str(x)
     ...:     return sum(map(int, x))

  In [6]: %timeit second_way_optimized(x)
  1000 loops, best of 3: 200 µs per loop

  In [7]: %timeit f(x)
  1000 loops, best of 3: 223 µs per loop
Marginally slower, a hell of a lot easier to read what's going on.
chriswitts··on Live Sails.js Course
It's also broken in Chrome v40
chriswitts··on Ask HN: How many hours do hackers sleep?
If I'm smoking, 7 hours. If I'm not smoking, 5 hours. If I'm not smoking and exercising, 6 hours. If I'm not smoking and exercising strenuously, 7 hours.