Thursday, June 3, 2010

guild wars on linux

cool. got guild wars running with wine on linux. the install and running the game was no problem, but i did need a couple of tweaks to get performance up to a playable level.
this page on the wiki was important, as it pointed out things like the emulated hardware acceleration for the alsa audio. (winecfg) i found that the pixel shader was fine to leave on, even though my hardware ain't that great. the wiki page says to use the pbuffer for osr on low-grade hardware, which i guess means to use a pixel buffer for off-screen rendering. i couldn't see how to do that, but fortunately it wasn't needed. also, i had to check the 'allow the window manager to control the windows' or else my keyboard wouldn't work and i couldn't even log in. i had previously changed the windows version to 2000 and installed a few winetricks, but i don't think those are too important.
some of the other changes i'm not sure if they are essential in isolation, but they're part of the final solution: (regedit) UseGLSL disabled, Multisampling enabled, anti-aliasing 2x in game. OffscreenRenderingMode to backbuffer seemed to help a lot with freezing graphics when moving (loading new shaders), even though the wiki page says to do that when the screen turns black. also, setting the game to fullscreen with the same resolution as my linux xwindows (1280x1024, like i said my hardware ain't that great) seemed to get better performance than any other resolution, even than lower ones. (it also avoids the annoying problem of panning around the virtual screen when i move the mouse to the bottom or right.) i also used WINEDEBUG=-all to turn off the errors and warnings, but i doubt that matters much. and i didn't bother to use the -windowed flag.
EDIT: based on the wine db, looks like pbuffer is a registry setting for OffscreenRenderingMode. a few other suggested settings, but i don't think i'll need them.

Wednesday, June 2, 2010

giffgaff

mobile phone company on the 02 network. maybe i need to look into this...

arizona's immigration law

william bennett has a good article up with some hard stats on the effects of illegal immigration crime in arizona. worth a read.

Tuesday, June 1, 2010

global warming

boy, do i get tired of hearing this: you get ten hot days in a row, and when the eleventh day is cold someone says, 'pfth! global warming....' then when there are ten cold days in a row, other people shake their heads on the next hot day and curse the knuckle-draggers who could doubt the truth about climate change in the face of such incontrovertible proof. if all those people realized how much they have in common, maybe they would just hang out with each other and leave me alone.

day to day weather patterns don't prove _anything_, about _anything_.

(disclaimer: i'm not trained in climate or geo sciences. i do have a background in engineering, and in particular i have experience with large-scale multiphysics modeling and computer simulation.)

atmospheric carbon dioxide levels have shot up dramatically in the last couple hundred years, to levels significantly higher than anything the earth has seen for at least hundreds of thousands to millions of years. a very large fraction of that c02 is almost certainly due to the fact that humans have been digging carbon deep out of the ground and burning it. co2, like other translucent media, scatters radiation which causes a greenhouse effect. the average global temperature of the earth has increased over the last couple of hundred years by about .5 to 1 kelvin. i don't think there are any (informed) people who seriously dispute any of these things.

the problem is how to connect and interpret them in the context of other physical processes. how much of that ~.7 k warming is anthropogenic? what additional changes would be caused by various human activity levels in the future? what effects will a higher average global temperature have? if you can come close to answering any of these questions, you deserve a nobel prize. heck, you deserve obama's, gore's, carter's, and arafat's, and probably a few others.

i think a lot of the confusion comes from a basic misunderstanding about what science is, what it's for, and how it works. for example, sometimes people hurl the label of 'theory', as if it somehow discredits or diminishes an idea. (you hear that one a lot in the evolution worm can, too.) yeah, guess what? general relativity is just a theory, too, but most of us walk around without worrying about suddenly flying off into space. or sometimes you hear talk of a 'consensus' among scientists, as if that proved diddly squat about the science itself. maybe i'll post more on this some time, but i wonder if the root of these problems is that, for much of the population, the last bit of science education they get is early in high school. and the people teaching those classes also had their last bit of science education early in high school. the connection to the research frontier, where you have to have a grounding in the basic epistemology, is very tenuous.

john derbyshire wrote an article last year in response to the climategate blip on the news cycle, in characteristically disgruntled style. i don't always agree with the derb, but i thought this one was well-written, even-handed, and insightful.

maybe a lot of people feel a need to have one answer, yes or no, delivered to their doorstep before morning coffee so they can just move on in the comfort of knowing that the matter has been settled. sorry folks, ain't gonna happen. this is a complex subject, with mountains of uncertainty in the model form, the inputs climate scientists feed into their simulations, and the experimental data collected to validate them. it might be that we will not know these answers with high confidence for a long time. we might never know. it might not be knowable. even if we did know, it might already be too late to do anything about it. i see people on both sides of the politics desperate to claim science as a bludgeon to use on the other side. well, maybe science just won't cooperate with either of you. feel better now?

i don't think this will be close to settled for a long time, but here's a clue to scientific status: you'll never hear a real scientist argue that his or her current research is a settled question. (duh! why would they be working on it?) but there are some basics that we can be fairly confident about.

problem is, we have to decide what we're doing tomorrow, today. so here's my prescription: keep studying it. meanwhile, make the cheap changes that reduce co2, especially in favor of energy technology that concentrates pollution rather than dilutes it (nuclear, anyone?). don't use hysteria to justify marxist central planning or costly, widespread upheaval. don't think you can shoot down a scientific hypothesis without proposing a better alternative. forget about the carbon-credit trees and cow farts. that's just carbon swishing around the surface of the earth, and it geologic time it doesn't stay in one place for very long unless it's well buried in the crust.

and don't talk to me about the weather.

bullet physics engine

bullet is a foss physics engine (mostly rigid body?) that comes in third against nvidia physx and havok among game designers (open dynamics engine is a more distant fourth). also used for movie effects on major releases. plugin for blender, as well as some other closed-source modellers. just saw some chatter on cython that a couple of different people are wrapping it for a python api.

electricity meter

2010-06-01 30107 7628
2010-06-07 30205 7628

Thursday, May 27, 2010

time format in bash

wanted to change the output format from 'time' (the default posix three liner is so wasteful of terminal real estate), but the bash time command ignores the -f option and the TIME env var. (contrary to the man page!) but TIMEFORMAT works:
export TIMEFORMAT="%E real, %U user, %S sys"