wednesday night / a site for sore eyes
choose one:
a few recent posts;
links to embarassing things;
rss was for robots.
July 1, 2008
around and around
ok, this is lame, but it's still a thing. i like resetting the
chronometer on my watch before i go out for a run. if i had a bad
run yesterday, resetting it means that it doesn't matter, i can go
have a good run today. if i had a good run yesterday, that doesn't
matter anymore either: today's run is what counts now. whatever.
today was my first day at the track since i moved into my new place,
and i did enjoy the fact that it's 10-15 minutes closer, not to
mention being all downhill (on the way there). today's workout was
great (10x800m):
- 3:04
- 3:03
- 2:58*
- 3:00
- 3:03
- 3:07
- 3:09
- 3:09
- 3:10
- 2:58*
(* = new PR)
(previously)
unrelatedly:
Freeing up space on our highways increases the flow of traffic and
saves commuters' time, money, and gasoline.
-- Wendell
Cox
ok, i call bs on that. freeing up space on highways increases the
number of other people who can now drive on highways, slowing down
traffic, and wasting commuters' time, money, and gasoline.
despite these lies, it is difficult for me not to be excited about
being able to vote on
some sort of train initiative this fall. i mean, what's the worst that
could happen?
i recommend checking out the rendered
stills. but the ones of anaheim suffer my typical complaint
about these things: why are those people in the park? i mean,
i could understand it if there were awesome shipping containers
there, but if it's like a
certain other park i never saw any people in there's just some
smelly river and nobody lives nearby.
also i wish we could build things out of something other than glass.
* * *
July 2, 2008
having it both ways
while signing up for the ing checking account, i discovered that
they don't allow deposits to ATMs:
Deposit paper checks - You can also deposit paper checks one of
two ways:
- Deposit the check into your linked checking account then move
it to your Electric Orange...
- Mail in checks
that seems lame. the credit union checking account doesn't seem to
have a direct-deposit activity requirement like one of BoA's
checking accounts (although i suppose i could have it deposit only
$1). BoA's other checking account doesn't have a direct deposit
requirement, and has a lower minimum balance than the credit union,
but at least the latter pays interest and doesn't give BoA any more
of my money.
so, at least for a little while, i'll keep the credit union account.
anyway, i suppose it can't hurt to have a little emergency fund
tucked away.
in a little under 12 hours, the movers should be here filling my new
apartment with way too much stuff i don't want anymore, and a few
things i do want. i am looking forward to playing my keyboard. i
am also looking forward to having a blanket, because i am tired of
being woken up at 4am by my own shivering.
speaking of beddings, i may also have my new mattress in 14 hours or
so. i am excited for that. i am less excited by the logistics; if
the movers aren't done by the time the mattress delivery people
arrive, i don't know what's going to happen. if they double park,
the electric buses (lka
trackless trolleys) may have difficulty getting around, and the last
thing i need is for more bus drivers to be mad at me.
when i got to work this morning, there was a paycheck sitting on my
desk. it has been a long and expensive month.
tomorrow is back to the track for a brutal 6 x mile workout. after
that, there's only one more track workout before the race. i
should go to bed.
* * *
July 3, 2008
for reals i moved
this would be the part of my journey where i feel at home - i get to
sleep in my own bed, even though it's in a different apartment, in a
different city, on a different coast. but this isn't my bed, it's a
new one. so, nothing's the same.
as a bonus for taking the day off for moving stuffs, peach came to
the city and we got to hang out for a little. neither of us could
remember seeing each other since i was here before i started at
novell, but it couldn't have been three years. could it?
i barely got 4 hours of sleep last night, in two shifts, but i
managed to have a funny dream. i was trying to get away from having
damaged a teacher's car with a tree (long story), and i remembered i
could just go to my room upstairs (as in, i was in my mom's house).
the bed up there had blankets, and was covered in clean laundry that
needed to be folded. i will leave as an excercise for the reader to
find all 8 levels of wish-fulfillment in that one.
* * *
July 4, 2008
one happy camper
someone at work mentioned vala this
week, or at least asked what i thought about it, so i had to mention
how awesome gom is,
with the caveat that it is broken right now and crashes when the GC
runs. i basically haven't touched it since april, when i first hit
this bug, and have had no luck tracking it down.
and that's pretty embarrassing. so i tried to fix it, now that i
have unpacking to put off.
patch one wasn't too difficult to track down once i started reading
some of the code where i was getting the failed assertion. it was
the classic passing an int instead of a jsval (even though my getter
func doesn't look at that field; it just returns the
"tiny" id):
Index: src/libgom/gomjsobject.c
===================================================================
--- src/libgom/gomjsobject.c (revision 57)
+++ src/libgom/gomjsobject.c (working copy)
@@ -602,7 +613,7 @@
JS_DefinePropertyWithTinyId (cx, ctor,
&enums->values[i].value_name[4],
enums->values[i].value,
- enums->values[i].value,
+ INT_TO_JSVAL(enums->values[i].value),
gom_js_object_get_enum, NULL,
JSPROP_READONLY | JSPROP_PERMANENT);
}
for the other, i pulled out all the stops, from hardware watchpoints
to malloc debuggers, to that awesome
gdb trick, to not installing a linux vm to use valgrind and refdbg on. i went back to
the tried-and-true method of littering code with printfs, and
narrowed it down to someting with the Event.target field.
eventually i realized that while i had written a great finalizer for
my base class, none of the subclasses chained up the finalize call,
which led me to return dirty, used, and freed objects later. my
classes have a lot of this now:
Index: src/libgom/gomjsevent.c
===================================================================
--- src/libgom/gomjsevent.c (revision 57)
+++ src/libgom/gomjsevent.c (working copy)
@@ -34,6 +34,12 @@
#include <glib.h>
+static void
+gom_js_event_finalize (JSContext *cx, JSObject *obj)
+{
+ GomJSObjectClass.finalize (cx, obj);
+}
+
JSClass GomJSEventClass = {
"Event", JSCLASS_NEW_ENUMERATE,
@@ -44,7 +50,7 @@
(JSEnumerateOp)gom_js_object_enumerate,
JS_ResolveStub,
JS_ConvertStub,
- JS_FinalizeStub
+ gom_js_event_finalize
};
static JSPropertySpec gom_js_event_props[] = { { NULL } };
tomorrow, instead of unpacking my dishes and glasses so that i could
make dinner, i will remove all the cruft from my tree, and finally
make that third release i've been wanting to do for three months.
also, if i didn't fix this bug i don't think my mind would let me
sleep tonight, so i am doubly excited. wooooo WOOOOOOOOOOOO!
* * *
July 5, 2008
all i need
after a long day of unpacking and setting up furniture and
equipment, i settled down to my first meal cooked in my new
apartment. pasta, of course, and two tall glasses of milk while i
watched the first episode of the news hour i've watched in five
weeks.
as an update to the comcast debacle, they've already sent me a bill. it has a credit for $20, but
not the full $100 that i was under the impression i was getting. i
guess i get to call back monday.
it's also night one of living without a dishwasher. i am super
tired, and really want to go to bed, but i better wash things from
dinner...
* * *
July 6, 2008
i should just write a script which twits these whenever i post, one sentence per minute
i forgot how much fun riding my road bike is.
five miles of my run this morning was spent along the beach. there
were hundreds of washed-up jellies. it was
gross.
there was also one huge seal (or sealion?). it was even more gross.
* * *
July 8, 2008
i slept so terribly last wednesday night and was doing moving stuff
etc. so i didn't go to the track last thursday. i told myself i'd
do the workout friday, but apparently there is some sort of massachusetts zone
in the park, and the track was actually closed for independence
day.
so whatever, i skipped it. today was the last day at the track
before the
race, and i'd say it went well (12x800m):
- 3:05
- 3:03
- 2:58
- 2:55*
- 3:02
- 3:02
- 3:03
- 3:08
- 3:05
- 3:08
- 3:02
- 2:58
(* = new PR)
and then after work i almost missed the late shuttle back to the
city and had to run to catch it and that wasn't fun.
i'm finally feeling like i'm turning a corner in the unpacking. i
think there may have to be a craigslist firesale after all, if phik
doesn't claim my shuttle first.
i am so tired and want to sleep so badly but i am going to be an
adult and go wash that one dirty knife i used to butter my toast.
* * *
July 9, 2008
an agreement in principle
i just had my first glass of raw milk. a whole gallon of this stuff
costs sixteen american earth dollars. they do take care of
the little things, though; they include a whole teat in the bottle
as a garnish.
if
the tie doesn't fit, you must acquit?
i read a bunch of books on my kindle while i was in europe. here is
a brief list:
-
Do
Androids Dream of Electric Sheep? - Philip K. Dick
-
Brave
New World - Aldous Huxley
-
Nonzero:
The Logic of Human Destiny - Robert Wright
-
Pride
and Prejudice - Jane Austen
-
A
Tale of Two Cities - Charles Dickens
-
Alice
in Wonderland - Lewis Carroll
-
Through
the Looking Glass - Lewis Carroll
-
The
Memoirs of Barry Lyndon, Esq. - William Makepeace Thackeray
i haven't quite finished the last one there, because i have been
reading the sf chronicle (i'll give you a minute to groan. go
ahead, i'll wait. the thing is, the times just doesn't have enough
articles on public transit or earthquakes). anyway, for one reason
or another, i've managed to highlight the following articles:
"We must embark on a national mission to eliminate our
dependence on foreign oil and reduce greenhouse gases through the
development of alternative energy sources."
Fisher acknowledges that he is not well known, has never built a
skyscraper before and hasn't practiced architecture regularly in
decades.
A study released earlier this year by a group found that increased
driving as a result of sprawling development in the next few
decades will overwhelm any gains from increased vehicle fuel
economy and use of low-carbon fuels like biodiesel.
For McCain and Obama, the economic message should be that "we
can't make (Americans') house value go up and gas prices go down,
but we can improve education, work on alternative energy and
invest in infrastructure. And probably if they weren't in the
middle of the campaign, they would be a lot closer on doing
that."
A security researcher revealed a flaw Tuesday that makes it
possible for a hacker to take control of the Internet.
anyway, time to do dishes.
* * *
July 10, 2008
living on the edge
i've taken a bold stance in my new apartment, one i don't ever
remember taking before: i'm just running dhcp on the airport router,
and not running a nameserver.
this is part of my new initiative, to have at most one computer
running. this is a new direction for me; who knows where it
will lead.
(of course, there will still be a tivo, slingbox, and two (down from
five? (!!)) airport expresses always running...)
unpacking is going well. the boxes that will never be unpacked are
starting to trickle into the living room closet, their final
destination. i am starting to accumulate a huge mound of
"wrapping" paper in the breakfast nook
office. i don't know what to do with it.
i cycled
to the office today, and it wasn't nearly as scary as i feared.
however, the hills coming home are moderately fierce. it has
occurred to me that perhaps i should wait until after the
marathon is over before i make this a regular occurrence.
* * *
July 12, 2008
pbs here is weird
i mean, would 'gbh ever show big? and was it
really 20 years ago?
anyway today i had all the foods i love the most, in preparation for
my insane run tomorrow. breakfast was two of the following: eggs,
toast, bananas, and glasses of milk. dinner was a ton of pasta, a
banana, and two more glasses of milk. i don't know what it is about
these foods, but they make me feel happy from the inside out.
of the boxes that i will actually be unpacking,
five seven remain unopened, and there's another 4
or 5 full of wires and stuff that haven't been unpacked. just about
all the furniture is put together (somehow i managed to get my desk
together by myself today), and it's starting to feel a little like
home. i need to get some sort of bike rack, because storing my bike
in the bathroom isn't going to cut it if i ever have guests.
i got a crazy messenger bag today. it is wicked orange.
* * *
July 13, 2008
getting there
it is quite vexing that the first three hours of a run can be so
splendid, and then the final hour so wretched (yes, pbs is showing
pride & prej again).
the next three weeks of training are fairly inconsequential and will
hopefully be without incident. there isn't much more i can do but
wait it out, and we'll see if i trained hard enough. yesterday, i
would have said "yes" but today i'm not so sure. of one
thing, however, i am certain: i will not be riding my bike home from
work the week before the marathon. i could feel the effects of the
hills thursday and friday; in fact these hills are for the
birds.
for the first time in almost seven weeks, i am typing this at
my desk. the bookshelf is now
stocked with books as well; i have an office! four boxes remain
unopened (roomba, scooba, rock band, guitar hero II), while four
more boxes of wires and doodads remain. it could be said that i am
done unpacking; the rest is "merely" putting things away
and cleaning up.
tomorrow i will put up my art and
there will be no mistaking: this is my apartment.
now it's time to go wallow in bed for a few hours, rueing the day i
ate five packets of
caffeinated gu.
* * *
July 14, 2008
another day, another pregnant friend
i don't know what's wrong with all my friends. i mean, i'm pretty
sure i could count to 28 in like, first grade. it's not that hard,
people!
* * *
July 16, 2008
gtk 3: a case for gom!
one of the original goals in
starting the gom
project was to be able to write gtk apps without succumbing to
the inherent problems of using gtk's apis. with gom, you already
only interact with objects using their properties, and instead of
silly, implementation-specific api calls you get to comfortably
surround yourself with the beautiful w3c dom standards you already
know and love from the web.
and if those aren't enough layers of abstraction from X or Quartz,
you can always throw your favorite
javascript library on top of it.
all this, and you don't need to deal with building on different
platforms and distributions!
at least that's the idea.
last night
i finally
checked in those changes i
mentioned. i then went late into the night trying to track
down numerous refcounting and garbage collection. getting close.
* * *
July 17, 2008
i know you don't care but...
i've fixed it up as best i can for now, and have made a release
of Gom
0.2.
since it's been a while, i'll refresh your memory:
What is Gom?
Gom allows you to write GTK applications using JavaScript, an
HTML-like widget layout syntax, the standard W3C DOM interfaces,
and jQuery.
Gom is on the
Web! http://ilovegom.googlecode.com/
next up has to be XMLHttpRequest.
i've been working at vmware for about a month now, and i
don't think i've gone to the same place in the city for lunch twice
yet. that is certainly something.
* * *
July 20, 2008
may as well
i think i found the source of the leak named root. either way, i
don't use named roots there any more, so they are not leaked. kudos
to
the tips
on spidermonkey garbage collection from jeff watkins. in my
previous efforts to track down these leaks, i had written
something
based on his idea in C, but hadn't used it until now>.
anyway, i put up
a new
release before i go and
implement XHR.
the other day i applied for health insurance. there were pages of
online forms to fill out, and they ask you to verify that the
information is correct, but i wasn't paying attention and didn't
notice that i accidentally misypted my weight - reporting myself as
100 lbs heavier than i actually am.
i tried to think of a better way of making people verify their
forms, and i came up with the following: go through the list of
fields randomly, and present the user with their answer for that
field. below this, offer them a choice of 4 possible options as to
what that field is. it's pretty easy - they can recognize that
their street address is their street address - and i think it would be
easier for them to spot typos this way.
* * *
July 20, 2008
after years of waiting
it took many, many more hours than it should have, but
i just
checked in some stubs
for XHR. while
the
interface may be beautiful enough for some, for those who prefer
a more visual representation, i present you with this:
it'll probably take another 3 weeks before i can do any more than this
i'm beginning to wonder whether GObject/C was the best choice here...
* * *
July 21, 2008
the mccain campaign stays mainly in maine
i
am cordially invited.
* * *
July 21, 2008
non-linear dynamics and capital externalities
a former colleague of mine pointed
out some articles on gas tax policy from the
ephemeral gary
becker
and richard
posner. they are talking about some study that they don't link
to, so i can't read it, but that won't stop me from writing about
it, too.
here is how these articles were originally presented to me:
Becker argues today that current US gasoline taxes already cover,
or at any rate the gap is small, the externalities associated with
driving
part of me wants to argue that the low taxes have not covered losses
in alternative transportation modes, but i'm not sure exactly how to
do that, yet.
clearly, it has never been the gas taxes that have kept people from
driving; for the vast majority of the population, we're only seeing
interest in alternatives now that gas is around $5 per
gallon, and the economy is tanking, and saving the
environment is en vogue, and we are stuck in yet
another war
for oil.
urban trolley systems have
been almost
completely dismantled,
and vast
areas completely impractical for public
mass-transit. there is no way the gas taxes can fund the
recovery of these areas into a non-car transportation system.
i'm sure that's not the point of the taxes, but certainly being in
the position where almost all of our country (less
its three
most walkable cities) is basically solely dependent on
automobile-based transit is not a good position to be in, and is
going to be expensive to get out of. or, if you like bailing out
airlines and paying over $50 per fill-up, it will be expensive to
stay in.
anyway, it certainly bothers me that people who do drive get a
positive externality every time i don't drive a car to go
somewhere. phil would say that i'm not paying the gas taxes, but i
am pretty sure i could come up with a ridiculous retort to that one.
* * *
July 21, 2008
why the government should manage my health insurance
not only did i mistype my weight,
but it turns out i mistyped my address as well. this will take
another week or two to sort out.
it's a good thing i didn't give them my SSN.
* * *
July 26, 2008
i still hate python
so, in order to
implment XMLHttpRequest.open()
(i still always type XmlHTTPRequest), i need to
support relative
URI references. this is not a completely trivial exercise, and
i hate writing parsing things, especially things that involve
charsets and potential security risks, so i was hoping to use some
awesome library for this.
i had hoped that libcurl would suffice, but it simply doesn't export
this functionality (although it must implement it internally).
sad. i couldn't find anything in the new gio apis either, which was
disappointing as well.
so, i went looking. the first one i found
was uri. unfortunately it
seems to have been a victim of the warn on terror, so i moved on.
next up
was uriparser. it
has a promising name,
and does
what i want, but the API is sort of dreadful, and it still had
crashable
bugs as of 2008. the final kicker was that although it supports
ACII and Unicode (UCS-4, i think?), it doesn't seem to want to do
UTF-8 out-of-the-box, which is a non-starter these days.
(unicode things still confuse me terribly, so maybe i am wrong here)
i next considered trying to use bits from mozilla, but
the necko
docs yell at me, and then throw me
at this.
i was hoping for a little more hand holding.
what i really want
is GnomeVFSURI.
of course, gnome-vfs has been deprecated for years now, but still
there is nothing equivalent that i could find. i didn't really want
to depend on gnome-vfs, so when ports wanted to install its own version of perl i lost it and
started trying to get gnome-vfs-uri.c to build as a library on its
own. this was going nowhere, fast.
then i remembered that i asked someone at work, and got the usual
"Oh just use Python,
it's so
great." i wasn't keen on adding a third type and
memory management system,
but the
api was great, and what i saw of embedding python from hula
wasn't so bad.
well, of course i was up all night, trying to find out what
@parameter meant, and why i could see properties
attributes when i ran the thing in python that i couldn't see when i
ran it from C. why would they make so much more difficult to access
attributes from C than it used to be? why am i such a terrible
programmer? will i actually fall asleep if i go to bed now at 9 am?
eventually, i noticed the following:
(gdb) p PyString_AsString(PyObject_Repr(mod))
$24 = 0x171e5b4 "<module 'urlparse' from '/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/urlparse.pyc'>"
this didn't look right. in python:
>>> repr (urlparse)
"<module 'urlparse' from '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/urlparse.pyc'>"
of course; this API is different in 2.4 and 2.5;
i just rued
again. even after completely obliterating the 2.4 version of
python (don't even ask why i had some third-party version installed;
i certainly have no clue), if i have to do some compat stuff for the
2.4 version, it's just not worth it. i
checked
it in for now since it works, but i still need to find a
permanent solution.
if it wasn't so completely beautiful outside, i would go get an xbox
and gta4, but i think i'll do some grocery shopping instead.
* * *
July 27, 2008
i.m. impressed
well, it's
done. gom
uses xpcom.
it was a bit painful at times, yes, but not nearly as frustrating as
trying to get the python bits working (despite that being
three-year-ago-me's fault). it's even now using the
standard gecko
sdk which should make it easier for others to build, and me to
support.
after i had
written gom_uri_get_contents(),
and everything was working great locally, i wondered: do i now
support remote files?
the answer is yes
well, as long as it doesn't require an auth dialog or anything.
i guess next up is
xpconnect,
which gives me XHR for free?
* * *
July 30, 2008
the final countdown
after twenty weeks of training, across five cities, four timezones,
three countries, two continents, and one cross-country move, i have
ten miles of training left before my race on sunday. it's a little
stressful, since pretty much i can only make
a cock-up
of it at this point. for example, sprinting, in the shoes that hurt
my legs, to catch the bus on monday.
they have some sort of real-time text messaging thing, so if anyone
wants to follow along in my brazen disappointment, let me know and
i'll add you to the thing. for those of you who enjoy sleeping late
on sunday, note that it starts around 5:30 am pacific.
other events that have recently transpired have been the 11th
anniversary of the last time i drove a car, and the receipt of a
letter from my health insurance company with the following amusing
excerpts:
Some medical conditions, either alone or in compination with the
cost of medication, present uncertain medical underwriting risks.
In view of these risks, we have enrolled you in our CORE 5000 PLAN
Level 1 Plus 50 Plan. This is our CORE 5000 PLAN Level 1 Plan
with an additional 50% premium. The basis for our decision is
listed below.
Provider: Health Statement
Medical History: Elevated weight
...
To be considered for a reduction in the additional premium, you
must 1. maintain your weight below 215 lbs for a mimimum of 6
months from the effective date of this coverage, and 2. meet the
Medical Underwriting Guidelines in effect at the time of
application.
i think i'm up to the challenge.
* * *
July 30, 2008
lost in translation
the end of
the news
hour's interview with pakistan's prime minister last night was
something my friend phil should read:
MARGARET WARNER: Bottom line, Mr. Prime Minister, what could the
U.S. expect to see, let's say in six months, as a benchmark, as
evidence that your government's approach to fighting terrorism is
more successful than President Musharraf's was?
YOUSUF RAZA GILANI: I really don't know. But at the same time, I
think, when there is any actions that has the support and the
backing of a political government, it is always successful.
MARGARET WARNER: But have you set any benchmarks for yourself?
YOUSUF RAZA GILANI: Certainly that we are convinced ourselves that
it's working.
...when there is any actions that has the support and the backing
of a political government, it is always successful.
well, i'm convinced, too.
* * *