Profile

Cover photo
Russ Cox
Worked at Bell Labs
Attended Harvard University
Lived in Cambridge, MA
4,321 followers|670,487 views
AboutPostsPhotosVideos

Stream

Russ Cox

Shared publicly  - 
 
"The problem with X-Ray networks is that exposure to them is fatal."
 
I hadn't seen this when it came out.  LOVE.  "See Straight Through Datacenter Bandwidth Limitations with X-Rays."
20
5
Erik Quanstrom's profile photoAda Lim's profile photoKamil Kisiel's profile photoBrad Fitzpatrick's profile photo
4 comments
 
Hitchcock et al arrived at the same conclusion when evaluating carrier pigeon networks.
Add a comment...

Russ Cox

Shared publicly  - 
 
The video tells the story of how Ken Thompson and others reverse engineered the Linotron 202 typesetter.

More material here: http://www.cs.princeton.edu/~bwk/202/

Also, some discussion on the TUHS mailing list. In this post, Steve Johnson tells the story of how the typesetter effected standard error: http://minnie.tuhs.org/pipermail/tuhs/2013-December/002933.html
58
10
Russ Cox's profile photoSkip Tavakkolian's profile photoOluf Lorenzen's profile photoNick Johnson's profile photo
6 comments
 
Great story.  Those Bell Labs guys sure could (can) hack!
Add a comment...

Russ Cox

Shared publicly  - 
 
How to make user-level profiling work on a Mac. Comments here appear on the blog post.
42
25
Greg A. Woods's profile photocomex .'s profile photoAndrei Lopatenko's profile photoAlbert Strasheim's profile photo
16 comments
 
It's easy to make your sigtest program deliver events to the sleeping main thread on Linux: Just block (pthread_sigmask) SIGPROF on any of the worker threads. You can see that the distribution of signals across threads is off too. It's bogus to expect setitimer signals to be delivered to a specific thread, they are delivered to any thread in your process which doesn't have the signal blocked. Linux is better than MacOS in that it will deliver events to the other threads first. You can see the code for thread selection here: http://lxr.free-electrons.com/source/kernel/signal.c#L950 See also gperftools note that timers and signals are shared across threads with NPTL on recent kernels: https://code.google.com/p/gperftools/source/browse/src/profile-handler.cc#80
Add a comment...

Russ Cox

Shared publicly  - 
 
I've been reading old posts on the Random ASCII blog. This one may be my favorite. It explains how sub instructions on the x86 can sometimes execute 4x faster than add instructions.
51
34
Paul Lalonde's profile photoErik Quanstrom's profile photoEric Rannaud's profile photoDan Farmer's profile photo
6 comments
 
+Ralph Corderoy ah.  that's it.  too much kernel programming.  i mistakenly did s/dependency/memory &/ when in fact it was a renamed register dependency.
Add a comment...

Russ Cox

Shared publicly  - 
 
Meetup #2: May 28th
Tue, May 28, 2013, 6:00 PM
8
Have him in circles
4,321 people

Russ Cox

Shared publicly  - 
 
 
If y'all wouldn't mind reading this, I'd appreciate it. 

If you like it, it would be kind of you to share it around as well.... 
9
9
Bill Neubauer's profile photoJohannes Kersten's profile photo
Add a comment...

Russ Cox

Shared publicly  - 
 
FizzBuzz in Go

Every time I see FizzBuzz mentioned somewhere on the internet I think two things.

1. That's a dumb problem.
2. There's actually a nice Go solution.

I've seen lots of people make the first observation but have never seen anyone make the second. It's basically a tiny prime sieve.
57
10
Shakeel Mahate's profile photoRuss Cox's profile photoRolando Segura's profile photoAxel Wagner's profile photo
14 comments
 
That's a nice example of goroutines and channels tying them together, but it's entirely too complicated for such a simple problem.

My observation once upon a time was that generators of cyclic groups define equivalence classes.  One can use that and cheat to produce a simple solution with essentially no tests in some languages.  Here's the solution I put on C2 a while back:

    #include <stdio.h>
    #include <stdlib.h>

    const char *fmts[] = {
            "%d", "%d", "Fizz", "%d", "Buzz", "Fizz", "%d", "%d",
            "Fizz", "Buzz", "%d", "Fizz", "%d", "%d", "FizzBuzz",
    };
    #define NFMTS (sizeof(fmts) / sizeof(fmts[0]))

    int
    main(void)
    {
            int k;

            for (k = 0; k < 100; ++k) {
                    printf(fmts[k % NFMTS], k + 1);
                    printf("\n");
            }

            return 0;
    }

Of course, this replies on printf() ignoring its second (and subsequence...) argument(s) if the format string doesn't reference such, which is hideous.

But Go is too smart for me and the transliteration of this program generates errors as fmt.Printf() knows that it is getting extra arguments and emits a diagnostic.
Add a comment...

Russ Cox

Shared publicly  - 
 
The internals of Google's pprof CPU Profiler (for C++ and Go). Comments here appear on the blog post.
233
115
Hammad Khan's profile photoEvgeni Belin's profile photoZhiwei Gu's profile photoStefan Clepce's profile photo
20 comments
 
Great post. +David Barzaga 
Add a comment...
Jeff Mitchell was tagged in Russ Cox's photo.

Russ Cox

Shared publicly  - 
1
People
Have him in circles
4,321 people
Work
Employment
  • Bell Labs
  • Google
  • Sabattis
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Previously
Cambridge, MA
Contact Information
Home
Email
Story
Tagline
Programmer
Education
  • Harvard University
  • Massachusetts Institute of Technology
Basic Information
Gender
Male
Links
YouTube
Other profiles
Contributor to