From now on, I will post on http://www.idupree.com/ rather than here.
(The canonical location of this blog post is now QEMU networking notes on my web site.)

The default network settings allow the guest to connect to the Internet (via TCP and UDP but not e.g. ICMP/ping), and to the host at 10.0.2.2.

If, for example, you're running a web server locally on the host, the guest can `curl http://10.0.2.2/`. A local firewall won't necessarily prevent this because QEMU makes the guest's network request from your computer and your user account. If your web server has rewrite rules based on the HTTP Host header, try changing Host using `curl -H "Host: localhost" http://10.0.2.2/` (use -v/--verbose to make curl show request and response headers).
Read more... )
(The canonical location of this blog post is now Some Linux virtual machines on my web site.)

I run Linux. Sometimes it's helpful to use a different Linux distro installation than my main one. For example:

  • For building Lasercake, I test building on both 32- and 64-bit Debian installations with only the necessary packages installed. This helps test that Lasercake doesn't accidentally depend on one of the thousands of packages installed in my main system.

  • I had to use OpenModelica. It didn't work right on my main Linux system at the time[1]. It did work right in Debian Stable, so I used it there.

  • For running software that might be malicious (e.g. random programs off the Internet) or vulnerable (e.g. old browser versions I'm using to test websites), certain virtual-machine configurations can prevent that software from compromising my main account.

  • Familiarity with virtual machines is also helpful for servers and for deterministic builds.


Some methods I've used:
Read more... )
(The canonical location of this blog post is now Code filesystem trees & dependency digraphs on my web site.)

Consider a collection of source code. It's arranged in a structure in the filesystem. Often, each file is a module named according to its directory-and-file-path. The filesystem structure is a tree (which is a directed graph).

At the same time, the code forms a dependency tree/DAG. A module is a node, and a module importing another module forms an edge. Alternately, items in the code such as classes or functions can be nodes, and an item using another item forms an edge. This is usually a directed acyclic graph. In some cases, cycles are allowed.

In good code, is there a similarity between the filesystem structure and the dependency structure?
Read more... )
(The canonical location of this blog post is now Arch Linux + ConTeXt on my web site.)

The command-line program to use for ConTeXt is texexec. (The lower-level context command may work in other distros but it doesn't in Arch currently. Luckily, texexec is great.)

ConTeXt currently requires Ruby older than Arch Linux's 2.0. Install e.g. Ruby 1.9 from AUR. Use env PATH="/opt/ruby1.9/bin:$PATH" texexec.

Hopefully this will be out of date by the time you read it!
Someone on StackExchange wondered why I like receiving directly from a mailing-list every post that it distributes.[1]

It's easier for me to sort and read threads in Thunderbird if the list sends every message to me.
Read more... )
(The canonical location of this blog post is now Why unauthenticated software download is dangerous and unethical on my web site.)

Have you ever done svn checkout http://include-what-you-use.googlecode.com/svn/trunk/ include-what-you-use?

How about download; ./configure; make; make install when the connection is HTTP and you haven't checked your download against a cryptographic hash (e.g. SHA256) or public key (e.g. PGP) provided via an authenticated channel (e.g. HTTPS)? [1]

Have you ever done these while using coffee shop or train or cellular Internet without a VPN? Or even on home WiFi in a crowded area? [2]

It's not just you whose security is at risk by these deeds.
Read more... )
(The canonical location of this blog post is now Enigmail & format=flowed on my web site.)

I decided it was time to restore my ability to sign/encrypt e-mail.

Glossary:
  • OpenPGP is a common cryptographic standard used for e-mail.

  • GPG is the FOSS implementation of this standard.

  • Thunderbird is the desktop email client I use.

  • Enigmail is the Thunderbird plugin for using GPG in Thunderbird.

  • Read more... )
(The canonical location of this blog post is now What if the car was invented today? on my web site.)

What car technologies would we choose "if the playing field were level again" (-Felix21 on HN) and we didn't already have gas stations *or* electrical fueling stations to bias our choice of fuel?

Counterfactuals are surprisingly complicated. The basics have already been invented for other reasons (internal combustion engine, battery, electric motor, etc) so any sort of car should work fine aside from the infrastructure (power distribution, roads). Which sort is best depends on e.g. whether there's cheap oil (there might be if we hadn't used so much oil already) and what people are using cars for (people would be used to another mode with different capabilities; I've read that humans regardless of transit mode tend to prefer about an hour commuting per day and the distance of an hour depends on the prevalent mode). Random thoughts follow:
Read more... )
I'm still trying to treat my old laptop as a secondary display, for more screen real-estate.

Main laptop: Linux
Old laptop: OS X, currently

Miscellaneous discoveries:

  • There are a few proxy X server implementations that allow switching a X client program between actual X servers! (Albeit by command line not click-and-drag.) Xmove is still being shipped in distros, though the code is old enough that it allegedly doesn't support 24-bit color.

    Xpra seems to be a modern variant with efficient network protocols and binaries for all major platforms. Unfortunately, (A) xpra has to run on both sides of a remote xpra connection; (B) my secondary display is running OS X; and (C) the Xpra OS X binary only supports[1] client mode in xpra–xpra connections (we need server mode there). Almost useful!


  • There is at least one program that can deal with multiple X displays: Emacs. I think it might be helpful to put my org-mode notes on my secondary screen, so that's cool.

  • Read more... )

Xdmx


Xdmx is an X11 tool that lets you treat two or more* X11 servers as two or more monitors. I tried to use it to make an old laptop be an external monitor (connecting over Ethernet). The old laptop would run an X server, and Xdmx would connect to that X server and to the one on my regular laptop. Then X11 applications would connect to Xdmx (which itself provides an X-server API), and I could move them between screens at will. Theoretically.
Read more... )
(The canonical location of this blog post is now Sound meter on my web site.)

I am just tinkering; these are estimates:

My laptop's fan is indistinguishable from background noise at a distance of 1 meter, though I can still hear it plenty. This background sound measurement is 18 decibels dBA. (Likely that's the minimum reading on this meter. It's spec'ed for 40-130dB though it works well down to 20 for comparisons.)

My fan is 35 dBA at 1m. It's a household fan about the size of my head.

Music played by my laptop speakers [testing song: "They'll Need a Crane" by They Might Be Giants] is 35-40 dBA at 1m when playing it the loudest I'd want to play it while standing in front of the computer, and 60 dBA at 1m when playing it at near max volume (which fills the room with sound).

One bathroom has a fan which fills the bathroom with 50-60 dBA, and a shower which makes noise at 70 dBA at 1m.
Read more... )

Data wisdom

Nov. 7th, 2012 07:48 pm
(The canonical location of this blog post is now Data-sharing Wisdom on my web site.)

I love Hubway and data, but was it really a good idea to release everyone's trip data? This is past, somewhat-anonymized data, for a contest to visualize how people are using the bike-sharing system. I can history-stalk everyone in Southborough who has a Hubway membership now :-(
Read more... )
_____ takes the cake as master cake-taker. They'd played Capture the [flag] Cake. The goal is to eat the other team's cake. Your team can't have your cake and eat it too; only the other team's cake is within the jurisdiction of your mouths. If your cake is a lie, however, your team will be judged un-cake-triotic for not supporting your local caketion-state.

ZFC

Jul. 29th, 2012 08:41 pm
A: Have you met Zermelo, Fraenkel, or Choice? I hear Choice is rather famous. Somewhat controversial.
B: What's Choice's first name? Axiom, was it?
A: Yeah.
B: *groans*
B: I met a guy named Axiom in a bar once. He claimed to be able to double my volume.
A: Really?!! That's so exciting! What did he look like?
B: I doubt it was him. He claimed he'd double my volume by buying me drinks.
A: Awwwwww.

Time

Jul. 27th, 2012 08:31 pm
(The canonical location of this blog post is now Time Measurement on my web site.)

Much software is based on the assumption that, given the moment X bajillion seconds from now, you will know how many times the earth will have turned since now, how many times the earth will have gone around the sun, and what date it will be.

Unfortunately, these assumptions are false.

Indeed, our very calendar is based on the assumption that the earth goes around the sun once for every 365.2425[1] days[2].
Read more... )
(Written last week.)

When I search the web, sometimes I feel like I'm cheating.

Today - browser history:

I've known for a while that shaders (e.g. OpenGL vertex and fragment shaders) were important, but had a devil of a time finding out a few specific examples of anything they were good for. I learned various things about them but but my chief discovery was some Valve documentation about their shaders. (Valve is a company I'd heard of and would know what they're talking about in this realm.)

Learning about Qt was a bit tricky. It's a storied toolkit that's been good for a long time. Read more... )

Test post

Jun. 22nd, 2012 02:42 pm
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Page generated Jun. 6th, 2025 04:10 pm
Powered by Dreamwidth Studios