Profile cover photo
Profile photo
Daniel Verkamp
39 followers -
Shifter of Bits
Shifter of Bits

39 followers
About
Daniel's posts

Post has attachment
Photo

After several hours messing with PulseAudio network setup to forward sound from Linux box to Windows box, I had a much better idea: 3.5mm cable from line-out of one box to line-in of other.

I couldn't find any documentation about adding an icon to a Windows executable with Go, so here's the lowdown.

Create a normal Win32 resource file (test.rc in this example) containing an ICON resource:

  1 ICON "test.ico"

Build the resource file into an object file with the .syso extension using your favorite resource compiler; I am using windres from MinGW:

  windres test.rc test.syso

Now build the Go source using the go build tool in the directory containing the .syso file.  The go build command magically picks up any object files named .syso in the current directory (!) and adds them to the final executable.  This means you can't fully automate a build with 'go build' anymore, so you'll need to write a Makefile or use some other build system to run the resource compiler first.

This was pieced together based on this golang issue: http://code.google.com/p/go/issues/detail?id=1552

Post has attachment
The Google I/O "input/output" puzzle... game... thing... (https://developers.google.com/events/io/) is a neat concept, but the execution of that idea is a letdown. It runs terribly slowly and inconsistently for me.

Also, this silly machine actually works (zero pieces, just resize the browser to be skinny):
Photo

Amusing tidbit from RFC 1288 (Finger):
(background info: a {C} request normally lists users logged into a computer)


2.5.5. Vending machines

Vending machines SHOULD respond to a {C} request with a list of all
items currently available for purchase and possible consumption.
Vending machines SHOULD respond to a {U}{C} request with a detailed
count or list of the particular product or product slot. Vending
machines should NEVER NEVER EVER eat money.

Favorite quote from a textbook: "This theorem, that for any optimizing compiler there exists a better one, is known as the 'full employment theorem for compiler writers.'"
(Modern Compiler Implementation in Java, ch. 17)

Useful MSYS fact of the day: setting the HOME variable in the Windows environment will point MSYS's home directory there (for example, set HOME=C:\Users\username), which is much more sane than the default home directory in the MSYS installation directory.
Wait while more posts are being loaded