joeshaw's comments

joeshaw | 11 years ago | on: ITerm2 2.0

The issue I've always had with the tmux integration is that it doesn't support multiple sessions simultaneously. I am typically moshed into several hosts and running tmux on each of them. I'd love to have one window per session with tabs corresponding to tmux windows.

I'm a little surprised more people don't run into this more often. I've never seen the benefit in running tmux locally. Do most people only ever use tmux on one remote host?

Edit: it's been a while since I've tried it; apparently tmux integration doesn't work over mosh at all. So s/mosh/ssh/g above and it still applies.

joeshaw | 12 years ago | on: Leaving Go

I posted a comment about this to the blog, but I released a tool which will generate type-specific source code from a generic definition. Code is at https://github.com/joeshaw/gengen

The abs example could be reduced to:

    import "github.com/joeshaw/gengen/generic"

    func abs(x generic.T) generic.T {
        if x < 0 {
            return -x
        }
        return x
    }
You could then generate different type-specific versions:

    gengen abs.go int32 | gofmt -r 'abs -> absInt32' > abs_int32.go
    gengen abs.go float64 | gofmt -r 'abs -> absFloat64' > abs_float64.go
    ...
The downside is that the API is annoyingly non-generic (a different abs variant for each type) but at least you didn't have to type it in a bunch of times.

I agree that abs() is kind of a toy example, but this approach has helped me a lot for various slice operations like indexing and deleting.

joeshaw | 12 years ago | on: Density.io

> Your device is doing the equivalent of standing on the street corner and screaming various things.

Except there's one huge difference: anyone with eyes and ears can understand what the person is screaming. I would wager that even fewer than half of HN readers realize what's being broadcasted here.

What you're saying is that every human must have complete technological and implementation knowledge of any possible invention or they are not deserving of privacy. That position is not only elitist as a technophile, it's arrogant to think that any one person could possess that knowledge, let alone billions. At some point, you'll be the clueless one.

joeshaw | 12 years ago | on: Tmux 1.9 released

mosh + tmux are simply amazing together. It has radically improved my life, where I keep persistent connections from my laptop to various remote machines.

joeshaw | 12 years ago | on: Tmux 1.9 released

The one downside to tmux over screen is that tmux basically requires that all clients connecting to it have the same screen size, and by default it chooses the smallest one. So while you can connect to an existing session, the output might be ugly.

For this reason, I typically simply 'tmux detach;tmux attach"

joeshaw | 12 years ago | on: Comcast Acquiring Time Warner Cable In All Stock Deal Worth $45.2 Billion

I really, really want the regulators to stop this, but most people only have the choice of a single cable provider anyway. Where in the US do Comcast and Time Warner compete head-to-head? It feels as though they have divided up the country similarly to how the baby bells were after AT&T was broken up in 1984.

joeshaw | 12 years ago | on: Webhooks Level Up

I wrote a tool to integrate GitHub pull requests with Jenkins builds called Leeroy: https://github.com/litl/leeroy

This new feature will make things so much easier to set up and debug, I'm thrilled. Before, you could not create a pull request hook without using the API, and this caused a lot of people confusion. We set up the hook automatically in Leeroy, but this will allow people to set it up manually if they want, and debug when it doesn't work.

joeshaw | 12 years ago | on: Docker 0.8: Quality, new builder features, btrfs, OSX support

Was the OS X binary built without cgo? I can't seem to access containers in private https registries:

    $ docker login https://registry.example.com
    2014/02/05 14:36:20 Invalid Registry endpoint: Get https://registry.example.com/v1/_ping: x509: failed to load system roots and no roots provided
The hostname in question has a valid SSL certificate. I encountered a similar problem in the past with Go built from homebrew[1][2]. Has anyone else seen this?

[1] https://github.com/Homebrew/homebrew/pull/17758 [2] https://code.google.com/p/go/issues/detail?id=4791

Update: Filed a bug against docker, others are having the same issue. https://github.com/dotcloud/docker/issues/3946

joeshaw | 12 years ago | on: Docker 0.8: Quality, new builder features, btrfs, OSX support

It is especially important to set DOCKER_HOST=tcp:/// before you run "boot2docker init" -- I forgot to do this initially and things failed mysteriously. I had to "boot2docker delete" and re-init to get things running.

Once I got that ironed out, everything is running very smoothly, and I don't have to ssh into the VM to do things. Nicely done.

My wish for 0.9 is a more streamlined installation process, possibly by simply incorporating these steps into a Homebrew formula.

joeshaw | 12 years ago | on: Hstore development for 9.4 release

About the upsert function, have you found a way to do this generically, or are you generating (at least) one function per table from a template? I've found the hackiness of this to be easily the worst part about using Postgres.

joeshaw | 12 years ago | on: Google Launches The Chromecast To Bring Chrome To The Living Room

It's worth noting that each consumer electronic manufacturer has its own name for CEC, rather than using the generic term. This, despite good compatibility between manufacturers' implementations.

From the Wikipedia page linked by the parent:

Trade names for CEC are Anynet+ (Samsung), Aquos Link (Sharp), BRAVIA Link and BRAVIA Sync (Sony), HDMI-CEC (Hitachi), E-link (AOC), Kuro Link (Pioneer), CE-Link and Regza Link (Toshiba), RIHD (Remote Interactive over HDMI) (Onkyo), RuncoLink (Runco International), SimpLink (LG), T-Link (ITT), HDAVI Control, EZ-Sync, VIERA Link (Panasonic), EasyLink (Philips), and NetCommand for HDMI (Mitsubishi).

joeshaw | 12 years ago | on: Gotk3: GTK3 the Go way

No mention of goroutines or concurrency in the post. Is it addressed by the project at all? I can't imagine that the GTK main loop will deal well with being cooperatively scheduled -- the UI would block any time another goroutine ran on the same OS thread.

Ideally the GTK main loop would run in its own OS thread, and there would need to be a way to ensure that no GTK calls happen in other goroutines. Other (threaded) environments tend to handle this by deferring via a one-off "idle" function that is scheduled and run by the GTK main loop for things like that.

joeshaw | 12 years ago | on: A better git log

I use something similar:

    [alias]
        lt = log --graph --pretty=changes
    [pretty]
        changes = format:%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset
It's nice to be able to separate the format specifier from the alias itself. Makes the configuration a lot cleaner.

joeshaw | 13 years ago | on: The best QBasic game ever?

I am also very thankful for the source for Gorillas and many simpler BASIC games before it. I started out by adding color to many existing text BASIC games and then moved on to writing my own.

Years later a friend of mine and I added modem support to Gorillas so we could play each other from our houses. Of course Scorched Earth would have been better, but we didn't have the source to that, nor the programming ability to add it at the time.

joeshaw | 13 years ago | on: Introduction to Go 1.1

"We trust that many of our users' programs will also see improvements just by updating their Go installation and recompiling."

Does anyone know if it is possible to determine what version of Go a given binary was compiled with? Perhaps extracting some metadata from an ELF section?

page 2