Older blog entries for johnm (starting at number 17)

3 Aug 2001 (updated 3 Aug 2001 at 02:53 UTC) »
Ob-Code Red

jschauma mentioned grepping apache logs for Code Red droppings, so I had a look. I got 9 today. This surprised me: I'm only on a dialup, and I've only been online for an hour or so today.

When the Red Hat 7.1 installer asked me about what firewall settings I wanted, I said none because I would either be on a company ethernet behind their firewall or on a dialup, and who on earth's going to come looking for me there? It seems that may have been a little naive... (And it's a good thing I'm not running any servers on the Windows side of this dual-booting box!)

I've only received one email due to it though, so I won't be breaking out the procmail big guns yet. I didn't realise that email might have somebody else's interesting document in it, so I just deleted it without looking. D'oh! [Double D'oh: it's the other one that sends the entertaining emails. Oops.]

Hacking

There's not many things less fun than writing instructions and tools for installing your project on an operating system you don't care about and never use in earnest yourself. The installation's really not that hard: the old instructions really did work. The project is a compiler and other programming tools, so my attitude used to be

They're programmers, so they should be able to follow the instructions to the letter. If they can't, it doesn't much matter because they wouldn't have much luck with the compiler anyway

Alas, my attitude is being forced to change to "I'll do anything to stop getting email from these people about this pathetic issue!!!"

Admittedly, the part that is changing did seem to be a little fragile (although it always worked for me... go figure), and the new method (our own little setup.ini) is what I intended all along. And playing with Cygwin's setup utility is kind of fun.

But writing moron-proof instructions is never fun.

It's been a while.... I became one of those layoff victims about a month ago, and I've not felt much like computers since -- and I don't have one at home to write on anyway.

Today had a couple of firsts:

  • For the first time, I turned down an appealing job offer today. It's a shame, but there it is. I'm accepting the other also appealing job offer though.
  • Tonight, while I was riding my bicycle down Almaden Expressway in San Jose, for the first time in my life some guy in a car decided he needed to throw something hard at me. Suddenly something painful hit me in the back, there was much wetness that I couldn't immediately identify, and there was laughter and a violently accelerating SUV on my left. It took a while to figure out what he had thrown, and whether I was significantly hurt (I wasn't, of course).

    What kind of freak has stuff on hand to throw at cyclists while they're driving down the expressway about to get on the 85 onramp? One who's just been to the supermarket and bought eggs, I guess. And one who has the appropriately neanderthal mentality.

It seems somehow fitting that that happened on the very day that I decided to leave the United States.

Rode the bike in this morning (cycling shoes). Then bouldering and a sauna for a while (climbing shoes). Now wearing vaguely formal shoes and the others are arrayed around my cube.

I feel like Imelda Marcos...

Fortunately, you don't need special shoes to play with cygwin, which is what's on the cards for this morning.

David, aka hacker, writes about a new release of pilot-link:

It fixes a lot of problems people have had, and it's going to be a mandatory upgrade when it's released.

Just what the hell is a mandatory upgrade? It may well be a desirable upgrade (but I have my doubts), and you might like everyone to use it, but you're not in a position to enforce that, and I don't think you should talk as if you were.

The last person I heard talking about mandatory upgrades was this guy.

What doubts? I have problems with some of the gratuitous changes in the new version. I install files with pilot-xfer dozens of times every day, and I really don't think the upgrade is desirable if it means I have to sit through

$ pilot-xfer -i blah.prc 

(c) Copyright 1996-2000, pilot-link team Join the pilot-unix list to contribute.

This is pilot-xfer from pilot-link version 0.9.5-pre5

pilot-link 0.9.5-pre5 is covered under the GPL See the file COPYING for more details.

Port: /dev/pilot

Please press the HotSync button now... Connected... Installing blah.prc... OK Install done

every time, instead of something more succinct, such as (from version 0.9.0)

$ pilot-xfer -i blah.prc 
Waiting for connection on /dev/pilot (press the HotSync
button now)...
Connected
Installing blah.prc... OK
Install done

I've brought this up several times, and believe it or not the above is a lot less stupid than it was in 0.9.5-pre3. But while the current one may be better than pre3, that doesn't mean it's good, and it doesn't mean it's better than 0.9.0.

I daresay I'm also a bit disgruntled because David has ignored most of the patches I have sent him.

14 Feb 2001 (updated 14 Feb 2001 at 05:37 UTC) »

I think maybe my work machine's zip drive is faulty. I had terrible trouble trying to transfer some stuff to a machine at home last week, and it has a joyous habit of corrupting the filesystems on my archive zip disks that have five year old email on them. Eeeeek.

So I now have no trust in zip disks as an archival medium, and I'm shopping for a CD writer.

It's not as terrifying as I was expecting, and they seem to be well supported under Linux. There's a huge number of different drives, but it seems like most of them speak the same language and once I've picked an ATAPI drive and plugged it all in there shouldn't be too much to it. (Famous last words...)

Of course I have no idea what a good brand is. I guess the next step is to check out the selection at Fry's on the way in tomorrow.

I never knew ATAPI meant "SCSI over IDE". What a horrible hack IDE is! And looking at the front of the machine in front of me, it occurs to me that 4 - (CD + Zip + CD-RW) = not many IDE spaces left for hard drives. Hmmm...

I looked at the calendar today, and it turns out that I've been back from New Zealand for four weeks now. That's hard to believe: I haven't achieved a great deal in all that time, and it sucks to be back.

There's an interesting post on the binutils list about printf as a macro:

printf ("%*s",
#ifdef BFD64
        16,
#else
        8,
#endif
        "");

If printf is a macro, this is nonportable because the preprocessor is not required to be able to handle directives while it's reading the arguments in a macro invocation (ISO/IEC 9899:1999 6.10.3 para 11). In particular, current GCC doesn't handle it.

But what kind of freak would define printf as a macro?

It turns out that doing that is valid: (ibid 7.1.3, and the same language is in C89 too)

[U]nless explicitly stated otherwise [for that function] [...] Any function declared in a header may be additionally implemented as a function-like macro defined in the header

Perhaps it's just me, but I find that surprising. I knew simple things like abs() were allowed to be macros and expected them to be, but I didn't realise the implementer was allowed to provide macro versions of pretty much everything. I'm sure I've written code like the above in the past (or maybe it was just with my own functions, but I don't think so).

The obvious fix is to write the whole printf twice. There's two other solutions too: one cute (but possibly hard on moronic maintainence programmers), and the other surprising at first that it is acceptable, but not when you think about it. IMHO.

The nice thing is that the standard actually tells you all about these solutions. That's unusually friendly for the C standard. :-)

Long long ago, I had a friend who did a late show on our student radio station. Sometimes I would go along to the studio and he would put "Walking down Madison" on the radio for me. But we're not in touch any more, and there won't be any more songs from Kirsty MacColl.

I don't have a story like Rachel's. Only that I could have seen Kirsty in concert in some small venue in London once upon a time, but I didn't go along that night. Only memories of some private episodes in my life that have songs from her earlier albums as their soundtracks.

I go back to New Zealand for a while on Saturday, and I'll be bringing my copy of Kite back to the Bay Area in the new year.

"Open the door and look up to the skies / And leave the shore / And let my hand trail in the cool water / Float downstream, say goodbye to that dream"

15 Dec 2000 (updated 15 Dec 2000 at 15:44 UTC) »

David A. Desrosiers, who sometimes calls himself hacker, writes:

Palmsource 2000 is winding down
[...]
I was asking them some pretty heavy questions about their position on linux and unix support with Bluetooth. They were hesitantly evasive
[...]
Again, somewhat evasive
[...]
Ugh. They're so blind sometimes.

Sometimes, David, I wish you would be a little less confrontational and perhaps give people the benefit of the doubt occasionally. "Hesitantly evasive" usually means that the person hasn't previously considered the point you've raised, doesn't want to give an implicit commitment to something that they haven't thought through, wants to be helpful so wants to avoid a flat NO, can't give you a full answer for stupid confidentiality reasons but doesn't want to turn you away, isn't involved in that area and doesn't know what other people in the rapidly expanding company might have already done in that area, or generally a combination of all of the above.

I happen to know all of the people in the talks you mentioned, and I can tell you that it's not very fair to accuse them of being evasive or blind. On the contrary: they're all very keen to help people's cool ideas become reality. Your cool ideas, so don't alienate them! :-)

A lot of engineers work at Palm. Not all of them know much about what we're doing with Linux or with free software, but that doesn't mean that it's not happening. All of my work and Keith's work is free software and runs on Unix. I think David knows that there are many people -- such as Kenneth, Flash, and me -- inside Palm who care about pilot-link a lot. We also spend a lot of time evangelising for these things within the company.

To be perfectly honest, it's kind of hard to stay motivated to fight the good fight when people oversummarise and tell you you're blind and you get close to zero support or assistance from the community for your open projects!

In other news, in the labs tonight the Llamagraphics people showed me another bug in CodeWarrior which partially screws up something we're trying to do in our SDK (yeah, that one that David's going to interrogate me about tomorrow). It whines that you can't do this static_cast with an incomplete type:

struct S;
S* foo (void *pv) { return static_cast<S*>(pv); }

By my reading of the C++ standard, this violates paragraph 10 of 5.2.9 ("Static cast"), in particular because a pointer to an incomplete struct type is indeed a pointer to an object type (3.9 paras 6, 9), and see also 3.2 para 4 (and pretend it's decreeing the converse :-)).

Bah. Fortunately, while walking back to the office after talking to Catherine and Stuart, I realised there's a workaround for full on C++ programmers who don't want to fall back to a C-style cast: use reinterpret_cast. Okay, so that's not great either, but it's not our fault! Get a real compiler!

3am. Still writing my slides for my talk tomorrow. Silly boy.

7:30am. Still here. Slides almost done. My talk is in three hours. I'm cobbling together a 2.1pre1 release to collect all the miscellaneous little bugfixes over the last few months. It's on the fourth hour long RPM build now, and it should actually work this time. Unfortunately I've just found out that not only does SourceForge have scheduled downtime tonight so that nobody will be able to download my release, but also the uploader has been broken for the last week so I can't upload it either.

I sure picked a good day to try to make a release on SourceForge!

lkcl writes that while skating,
...a car tried to force me into a different lane ... perhaps they should check the laws...

Just curious... does Oz law recognise skates as a roadworthy vehicle? If so, I'm impressed!

Happily, no cars tried to kill me on my way in to work this morning (cycling on Sunnyvale's Lawrence Expressway, which is much like a New Zealand motorway, only with more lanes). It may be a better than average week on that statistic.

Meanwhile, in computer-land (rather than commuter-land, har har), gibreel writes:

prc-tools continues to go way too slowly, due mainly to my having to spend a lot of time doing things for which I get paid.
Er, possibly also because its maintainer hasn't been getting back to you about any of your problems. Sorry about that.
I've hacked around the binutils issue by reverting to a base code segment address of 0x1000 instead of 0x0.
Yeah -- the warning you were getting was new in binutils 2.10, which is why I wasn't getting it before. You could disable it by adding --no-check-sections to the spec file.
This will probably break other things horribly,
Yup. But it's possible that the section base arrangement will have to change like this anyway to support the debugger, and there's another nasty bug that's related too.

It's been one of those days on palm-dev-forum:

Joy.

8 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!