Holiday poem

Filed under: politics — jlm @ 20:05

I was staying away from doing links to news and politics, but it’s a blue moon when a Congressman shows this much sense of humor.

Dingell’s Jingle


Resetting graphics card without resetting X

Filed under: linux — jlm @ 21:00

Hmm, been a while since I put anything here. How about a tip o’ the month?

Say your graphics card gets all wonky, but you still have a lot of state in your X session which you don’t want to lose. A good thing to try is “sudo chvt 1” to switch to a text console. Then when you bring X back with Alt-F7 or whatever, the X server shifts the card back into graphics mode from a clean slate and then displays everything you have up. Of course, it doesn’t work if it’s the X server itself which is messed up, or if the card’s state is too far gone to switch to text and back.


Philosophic musings

Filed under: philosophy — jlm @ 21:28

So, what is free will, really? Well, there’s enough answers to that question that another one can’t hurt. I consider free will to be the ability to consider the choices that one may make and decide among them. That would make the sensation of free will the feeling that one is considering choices and deciding between them.

This really boils down to what “ability” is though, and for all that it seems superficially simpler, it seems to be fundamentally tougher concept. I had corn flakes for breakfast today, but I could have had Cheerios — or could I have? This happened this morning, the past is fixed, so I couldn’t have had Cheerios because I didn’t. What does it mean to say “I could have had Cheerios.” when “I had Cheerios.” is false?

It means I was considering what to eat, and Cheerios was a choice under consideration. When we make choices, we model (consider) the result of the choices, and it’s to that model that “I could have …” refers.

The human mind is extremely complicated and poorly-understood. Let’s consider a far simpler system: A chess program on a computer. Does it have free will? Well, it needs to make decisions: Does it move this pawn, sac that knight, develop that rook? It calculates the results of all these possible actions, as thoroughly as it is able, and decides upon a move.

It goes through a lot of effort, but the programmer who designed it could tell you exactly why it chooses the move: It calculated this series of moves as being the best for both sides as near as it could figure, resulting in this board position, which it evaluated as superior to the board positions from the other possible moves, blah blah blah, the point is as a consequence of its programming it couldn’t have done anything other than queen takes pawn.

Those of us outside the program see it that way, but the program has to consider all these other moves. It has to model their consequences. It does a ton of calculation, and eventually makes a decision. It “could” have sacrificed the knight, in the sense that the decision mechanism has to consider that possibility. It “couldn’t” have done so, in the sense that its decision mechanism has to reject it.

I “could” have played hooky from work yesterday, in the sense that my decision mechanism considered the possibility and modeled the consequences. I “couldn’t” have played hooky, in the sense that my decision mechanism rejected it. That feeling of your decision mechanisms in action is the sense of free will.


Restarting firefox after a crash

Filed under: linux, web — jlm @ 15:11

After a crash, do you get messages saying firefox is already running and to shut down your old instance before starting up a new one? You need to delete the invisible “.parentlock” file in ~/.mozilla/firefox/$profile. It might also help to kill any gconfd processes and remove any files named ior anywhere under ~/.gconf (find them with find ~/.gconf -name ior).

Why can’t these apps store some kind of host-process identifier in their lockfiles, so they can detect staleness? (See eg. screen, which easily distinguishes local-live, local-dead, and remote.) gconfd is especially annoying, because it doesn’t report the errors except to the syslog, so the user just gets the mysterious symptom of their configuration settings disappearing.


Sea of gold

Filed under: biking, so. cal — jlm @ 17:00

It was a nice warm day today (unlike all of last week), so I rode down to the beach this afternoon as a break from work. Now, I’d heard the phrase “sea of gold” applied to the ocean before, but this was the first time I’d seen it. The angle of the sun made the vast expanse of the sea look like how you might imagine molten gold*. It was beautiful. It was also painful to look at because it was so bright. In ten minutes only the distant ocean looked golden, and in fifteen the entire effect was gone.


* Actual molten gold looks glowy red-orange, like pretty much any other molten metal, because the black-body radiation exceeds the reflected light.


Protecting running scripts from modifications

Filed under: programming — jlm @ 13:48

The shell reads scripts in as it runs, and not even nicely line-by-line, so when you modify a running script, weird things can happen as the shell gets inconsistent versions. Usually this just results in harmless errors like “/home/jlxmodmap not found”, but if you’re like me you worry about “rm tmpfile; process importantfile” turning into “rm importantfile”. The usual technique for the paranoid is to “mv script script.old; cp script.old script”; the shell sees the old script, which you keep unmodified, while you edit the copy. But it’d be nice if you didn’t have to do this everytime…

So, someone told me the trick of having all the work a script does happen in a shell function, which you call at the end of your script. I’m using this for my .xsession (canonical example of a script modified while it’s running), which looks like:

main() {
  do stuff
  do more stuff
  do even more stuff

voilà. It’s already read in all of main() by the time it runs it, so you can modify it freely, except when it’s just starting up and parsing things.


Men are from Earth, women are from Earth

Filed under: science — jlm @ 17:04

So, the results from the meta-meta-analysis (seriously) are in: Despite what well-selling relationship books may tell you, men and women are way more alike than different. Ha! I figured this was all over-exaggerated and over-weighted.

Popular science version

Real science version


Why to wear shoes, II

Filed under: biking, humor — jlm @ 07:17

[photo of my shoes]



Filed under: humor — jlm @ 14:19

This review of The Story about Ping made me (literally) laugh out loud.

[book cover art]

[link to amazon.com review]



Filed under: math — jlm @ 08:27

So, can spokes help hold our Orbital (see below post) together? After all, internal tension acts mostly transverse to the centrifugal force whereas a spoke would act mostly along it. How about attaching the spoke to its opposite point on the Orbital?

Well, centripetal acceleration at a distance r from the center we already worked out to be a = r·4π²/d². If the spoke has linear density σ, then the mass of a bit of spoke Δr long would be ΔM = σΔr and have weight Δw = aΔM = r·(4π²/d²)·σΔr. So the total weight of the spoke half would be w = ∫dw = ∫r·(4π²/d²)·σdr = (4π²/d²)·σ∫r dr = (4π²/d²)·σ·(r²/2) = (2π²/d²)·σr²   (integrating from 0 to the Orbital’s radius).

The tension on the spoke just from its own weight is that of both halves, or T = (4π²/d²)·σr². This gives a T/σ of (4π²/d²)·r² just for the spoke to be strong enough to support itself. With d = 86400 s and r = 2×109 m, we’d need a strength of 2×1010 m²/s², which is as much as we’d need for the Orbital to support itself with internal tension anyway! Tweaking values won’t help, as in both cases the equations work out to T/σ = a·r. I think this means that diametric spokes can only be less effective than a band at holding a spinning structure (of any size) together.

What if we add a hub? Then the tension on the spoke is halved, but we have the problem of holding the hub together. We can also vary the spoke thickness, because tension is not uniform over it: Near the Orbital, it’s only carrying the support load, but at the hub it has the load from its own weight as well. With constant specific material strength S = T(r)/σ(r) and support load s, and Orbital radius R, we get the integral equation T(r) = s + ∫rR dw = s + ∫rR r·(4π²/d²)·σ(r) dr, or σ(r)·S = s − ∫Rr r·(4π²/d²)·σ(r) dr.

This gives the differential equation σ’(r)·S = −r·(4π²/d²)·σ(r) with initial condition σ(R) = s/S. At this point, I had to go and dust off my old math books. In standard form, the diff. eq. is σ’(r)+(4π²/Sd²)·rσ(r) = 0. This has solution σ(r) = (s/S)·exp(−A(r)) where A(r) = ∫Rr (4π²/Sd²)·r dr = (4π²/Sd²) ∫Rr r dr = (2π²/Sd²)·(r² − R²).

This simplifies to σ(r) = (s/S)·exp((2π²/Sd²)·(R²−r²)). At the hub r=0, so we have σ(0) = (s/S)·exp(2π²R²/Sd²). So the tension on the hub is T(0) = s·exp(2π²R²/Sd²). Kevlar has a S = 2500 MPa/(g/cm³) = 2.5×106 m²/s². So, for each pound the Orbital supports, this would place exp(4000) = 101800 lb of tension on the hub. That’s farther beyond scrith’s capabilities than scrith is beyond ours. How about that miracle nanotube cable? S = 37 GPa/(g/cm³) = 3.7×107 m²/s², so T(0)/s = exp(286) = 10124. Trying to hold it together with a hub makes the problem much harder, not easier.

Powered by WordPress