TruerWords Logo

Search TruerWords

This is one of my journal's many "channels."
This chanel only shows items related to "Brian Andresen."

Sign Up  Log On
Friday, February 2, 2007

Chat with Brian Regarding Lexers and Parser Generators

(I'm sure with that subject, everybody's just dying to read this one...)

I had a (third) chat with Brian Andresen today about Lexers and Parser Generators, a type of software that's working overtime to suck worse than most email clients.

Brian Andresen 11:06:49 Brian Andresen
remember we were looking for Unicode-savvy parsing tools a while back?
Seth Dillingham 11:06:59 Seth Dillingham
I do
Brian Andresen 11:07:04 Brian Andresen
I'm looking for new parser-generator tools for my project at work
Seth Dillingham 11:09:23 Seth Dillingham
oh man, very interesting
Brian Andresen 11:09:51 Brian Andresen
I suspect that the author is more mindful of capability than performance
still, I plan to download it and try a small grammar with GOLD
I'll also try out ANTLR (again) and ACCENT (
(why do all of these tools use all-caps names? dunno.)
Seth Dillingham 11:11:18 Seth Dillingham
ANTLR is an acronym, I don't know about the rest
not that it matters much
Brian Andresen 11:11:40 Brian Andresen
Seth Dillingham 11:12:00 Seth Dillingham
I know ANTLR made some more progress, but I haven't played with it.
heh. Check out the first News Item on the ANTLR home page
Brian Andresen 11:12:59 Brian Andresen
bah, GOLD is Win32-only.
Seth Dillingham 11:13:07 Seth Dillingham
This whole class of software is a joke.
Brian Andresen 11:13:24 Brian Andresen
2009?! we're going to have to wait a long time for that next beta.
Seth Dillingham 11:14:09 Seth Dillingham
But the news is in past tense! I think they're probably just thousands of timezones ahead of us. That would explain it.
Brian Andresen 11:14:17 Brian Andresen
yeah, there's not much out there that's free. I've found a bunch of commercial tools, but none of them have even inspired me to request a trial version
Seth Dillingham 11:24:57 Seth Dillingham
Brian Andresen 11:25:11 Brian Andresen
that's very relevant, thank you
Seth Dillingham 11:25:32 Seth Dillingham
Looking at this stuff never makes me happy. :-(
Brian Andresen 11:25:40 Brian Andresen
no kiddin'
well, that just left me with a grand total of zero tools to investigate. lame.
Seth Dillingham 11:26:18 Seth Dillingham
I think, "I could devote a ton of my time to learning the issues and helping to fix these problems. Or I could make a living and have a life, and make do with what I already have."
Brian Andresen 11:26:31 Brian Andresen
Seth Dillingham 11:26:58 Seth Dillingham
But it still makes me nuts. My work could really benefit from a good, Unicode-savvy parser generator.
with a C++ target
Brian Andresen 11:28:01 Brian Andresen
yeah. the thing that got me started on this (for Agilent) was how poorly designed lex/yacc (and flex/bison) are for providing code to be part of a larger project
they were designed for making a standalone executable that doesn't need to do much more beyond the parsing, it seems
Seth Dillingham 11:28:56 Seth Dillingham
they're specifically for feeding a compiler, right?
Brian Andresen 11:29:22 Brian Andresen
our simulator already has six lex/yacc-based parsers in the code, and we end up having to mangle the yy___ symbols and other globals to even just make it link
Seth Dillingham 11:29:57 Seth Dillingham
(a particular kind of compiler/builder, I mean)
Brian Andresen 11:30:06 Brian Andresen
Seth Dillingham 11:30:17 Seth Dillingham
Hey, do you mind if I post this conversation on [tw]? I'll hide your handle.
Brian Andresen 11:31:36 Brian Andresen
oh right, and my other gripe was memory management. Suppose we're parsing through a line and allocating memory for various things as we go. Then we hit a syntax error. There are ways to design the rules to do error recovery, but designing the rules to allow error recovery to clean up all allocated memory is not obvious at all.
go for it
Seth Dillingham 11:32:48 Seth Dillingham
Monday, January 15, 2007

Macworld 2007 Recap

My intent at the start of my travels for MacWorld 2007 was to provide daily updates on my goings-on and derring-dos. Hah. With all the hours in the show hall, and Dinners (with a capital D) every night, I quickly learned that there was almost no time for writing.

This entry will attempt to provide those details which I can recall…

My previous entry finished on Monday morning, and mentioned my plans for the day. This is where we'll pick it up.


Booth Setup

Bare Bones rented a 2-meter booth in the "overflow hall". There was room there for two presentation stations, or one station and stacks of literature, window stickers, and CD's. They chose the latter.

When I arrived (30 minutes early), nobody and nothing was at the booth. No boxes, no computer, no literature, nobody from Bare Bones. Nobody. So, I spent some time chatting with the guys from provue (makers of Panorama), and then went back to my hotel room.

Back to the booth again at 2:30. The "media rental" guy was there, and was annoyed that we hadn't received anything yet, so he made a call and five minutes later the computer (Dual G5 tower) and the display (30" Apple Cinema) were delivered.

The mac had the wrong display card for that display (only 64 MB of vRam), so it was only able to drive it at 1200x800. I thought that was actually a *good thing*, as it was for presentations, not "daily use." Eventually everybody agreed (or at least agreed to give it a shot), and I'm glad: the display looked great if you were standing back a few feet. We often had large crowds watching our demos, and the low-resolution display made it possible for them to see everything we were doing.

Brian Arrives

Brian arrived in the area a bit early, but I couldn't leave until 3 so he found a parking space over on Mission St. and then walked over.

We met up outside, and I took him downstairs to the show entrance. Couldn't take him past the doors for the lack of an Exhibitor badge, and the 90 year old security guard was clearly prepared to Take Him Out.

Eventually Rich came out, they met, we all chatted for a minute, and then Brian and I found his car so we could go…

Touring Fisherman's Wharf

Oh the tourist-trappiness. It was nearly overwhelming. Every shop offered kitsch at off-season discounts.

In the mid-nineties, while traveling all over the country at the behest of RR Donnelley's sales people, I'd been to San Francisco with Dirk Samuelson (an RRD employee). We found a shop, somewhere, with some very high quality sweatshirts and I bought a couple for my girlfriend, Corinne. Only recently did those sweatshirts wear out enough to require dumping, so I picked up a couple more. I couldn't find anything quite as nice as the old ones (isn't that always the way?), but I did my best by looking at the offerings of every single store.

Brian with Alcatraz

Brian picked up some chocolate for his girlfriend (whose name happens to meet Macrobyte's standards, even though he hasn't worked at Macrobyte in many years ;-). Then we dropped our packages at his car and returned to Pier 39 for some pictures of the sea lions and us in front of Alcatraz.

After the pictures, he drove me back to the Marriott and then headed back out of the city.

Brian worked for me at Macrobyte for over a year, and we've been friends for over a decade, but that was only the second time I've met him!


Breakfast at the Garden Terrace again, this time with Patrick Woolsey (Rich Siegel's partner at Bare Bones) and Ciaran Benson (who worked the booth with us all week).

After eating, Patrick and I went down to the hotel's Shipping & Receiving dept. to pick up the t-shirts and schlep them over to the hall. Ciarnan went to the printer to pick up data sheets of BB's products.

Once we were all at the booth, we only had two things to do: collate all the data sheets and media kits, and fold a couple hundred t-shirts. Ciarnan worked on the paper while I folded.

Eventually, I figured out how to fold the shirts so that the Bare Bones logo was centered on the front. I showed Patrick and a volunteer from another booth how to fold them. With three folders we made short work of the pile.

Then I helped Ciarnan finish with the media kits and data sheets, just as hundreds of visitors swarmed the show floor.

Rules of the booth: drink a lot of water, use the Purel (hand sanitizer), and ask everybody if they have a question. Most will say "no," immediately before asking a question.

Rich's Friends

A bunch of Rich's friends came to the booth toward the end of the day, expecting that Rich would join them for dinner. He had other plans already (see below), but they still hung out at the booth for at least an hour. The bantering was fun.

Someone fussed that BBEdit doesn't support a certain, very simple file type used by Mac programmers. So that night I started throwing a module together, hoping to finish it by the end of the show. Didn't quite get there, but I did have it fully functional by Sunday night. (In fact, it's already in that gentleman's hands and is being beta tested.)

Dinner with the New Rock Stars

Brent had written to a small group on Monday night about having dinner on Tuesday. In his words, "A post-keynote, post-first-day dinner with a few smart folks sounds like just the thing." Apparently, a typo resulted in my receiving the invitation also, but rather than point it out I simply accepted. ;-)

So, Tuesday night we met at the top of the escalators before walking to the restaurant. Attendees included Brent Simmons, Buzz Andersen, Gus Mueller (his page mentions meeting me, in a funny way), John Gruber, Niall Kennedy, Patrick Woolsey, Paul Kafasis, Rich Siegel, Ted Leung, myself, and possibly one or two others whose names I can't remember (sorry!).

Update: Here is Ted's picture of the dinner.

I don't remember what I ordered, but it was terrible. Yuck. Niall — sitting right next to me — made me very jealous with his gigantic, juicy hamburger. Wah.

After the introductions, we mostly talked about the death of Apple Computer, Inc. (the pundits were right all along!), the new Apple TV, and the iPhone. Most notably, the lack of 3rd party app support on the iPhone, which bit everybody in that group right in the tuckus.

Oh, and I told my...

Funny John Gruber Story

What John Gruber story? OK, here:

BBEdit 8.6 added support for the Markdown language. (Markdown is like HTML shorthand, basically.)

Writing the Markdown support for BBEdit was very challenging. This is a language that's designed to be processed once, to convert the markdown to HTML. Speed of processing was not a consideration. However, I (that is, BBEdit's Markdown module) need to process at least part of the Markdown content with every keypress, so as to figure out what to color and how to color it.

While John was beta testing the module for us, he had a bunch of very particular bug reports and feature requests. He wanted everything to be just so. It was tiring, but I appreciated it because we needed a lot of testing very quickly.

Then he submitted one last bug report. Apparently, inline links can have titles (which I knew), and those titles are delimited by quotes. Here's an example:

This is some [linked text](<link_url> "link title").

The syntax docs on John's site said that inline link's titles were delimited by double quotes., John's implementation of Markdown in perl — the canonical Markdown interpreter — used double quotes to delimit link titles.

John's bug? He pointed out that even though it's not documented, and the interpreter doesn't actually support it, it's (somehow) a bug that BBEdit did not support 'single-quote delimiters' around the link titles.

(I still think it's funny, but I guess I can see why nobody else would.)


I don't remember much about Wednesday except the MacSB dinner, which was a couple blocks from the show.

After walking down there, I almost went into the wrong place. The restaurant I could see had a sign that said "Chaam Cafe," so I assumed I'd been given the wrong name. However, as I drew near I saw another restaurant next door, and the part of the sign I could read said, "t Cafe". I found out Thursday that others actually went into Chaam Cafe, and two of those with whom I spoke enjoyed a Mac-related party with a bunch of people they didn't know, and got a free meal out of it!

I ate with Paul Kafasis of Rogue Amoeba, Jerry Kayne, and Willian Van Hecke from The Omni Group. However, the restaurant was very crowded and I was tired, so I left as soon as I was done eating.



As with every other day on the show floor, we had breakfast at the Marriott. Rich joined us this time, and Agnes (one of the Omelette chefs) recognized him immediately and asked where he's been all week!

"The Fetch guys" sat with us.

MacBrainiac Challenge

Rich was the captain of the developers team for this year's edition of the Macworld game show, which pit the developers against the reporters with trivia questions. Chris Breen was the host.

At the last question — which was actually a challenge, not a question — the teams were tied. The challenge was to send Chris an electronic birthday greeting from their computer (one computer per team), without using email and with the understanding that his laptop was completely off the air.

The solution was to send an SMS message to his cell phone, from iChat. The contact info had been pre-loaded onto both machines, but you had to know how to use iChat with SMS. The reporters tried to use text-to-speech to have their mac deliver the message to Chris vocally, but that answer wasn't accepted. (This really annoyed Andy Inhatko.) Frankly, I think the only reason it wasn't accepted is that it's not the answer they expected. The question should have specified that the solution had to work whether Chris was in the room or 1,000 miles away.

Anyway, the developers won.

Show Floor

My Yojimbo demo was in full swing by this point.

The last couple days of the show mostly blurred together, but I think this is the day that Merlin Mann interviewed Patrick at the booth for about fifteen minutes. You can watch the video, here.

Patrick is about 6' 4" (Update: that said 6' 1" originally. Sorry Patrick. All you little guys look the same!) and weighs a good and very solid 280-290 pounds. Throw in the dark hair, the beard, and the low, rumbly voice and you'll see why I call him Paul Bunyan. :-) Put a knit cap on his head, a plaid, flannel shirt on his shoulders, and an axe in his hand...

Rich wasn't around for most of the day. He spent all day meeting with press people, being interviewed about BBEdit and Yojimbo.


Rich made dinner reservations for us at a Chinese restaurant, Brandy Ho's. I walked all the way (a couple miles) in, which felt great. Man, what a city for people-watching. (Corinne wouldn't have enjoyed the walk quite so much, but as I walked I thought about how much she would have loved seeing all the people.)

In attendance at dinner: Rich, Patrick, Naomi (BB's PR person), Sandy (former BB marketer), Sal Sahogian.

Yeah, that's right. I had dinner with Saul, who you all know. :-D

He told a very funny and very memorable story about his days as a nightclub manager in NYC. No room to retell it here, but the best line was, "Sal, I'm starting to get upset," said in a very quiet voice.

After dinner, Rich joined me for the walk back and we mostly talked shop until we had to split for our separate hotels.


Friday was a blur of exhaustion, sore throats, and Yojimbo-demo-burnout. ;-)

The show ended at 4 PM on Friday instead of 6 like the rest of the week, and most of the hall was rolled up by 4:30!

I couldn't find anybody at the show who was actually selling iPods (how crazy is that?), so after the show I walked to the Apple store to buy one for Corinne. Picked up a 30 GB black (which she seemed to really like when I gave it to her Saturday).


Update: I met Apollo on Friday, for the first time ever. Not sure how I forgot this when I first wrote it up, except that I was tired of writing!

(Apollo is a cyclist from the bay area, who has made some very generous donations to my PMC fundraising efforts in the last couple of years. He also had a horrendous bike accident that nearly ended his cycling for good.)

He works right down the street from the Moscone Center, so he took an extra-long lunch break to meet me and see the show. Rich and I were out wandering the show floor (after a friendly, thirty minute chat with the tm boys). We had stopped to talk to a known BBEdit user who happened to be 6' 6" tall (Rich said he felt like a hyphen between us), when this stranger walked up and said, "You must be Seth Dillingham!" He figured it out based solely on the fact that there were two guys there wearing BBEdit t-shirts, and I was really tall!

The most notable moment for Apollo, though, was clearly when the cute Australian boothbabe stepped in front of him and offered him some information about some product. Let's just say she could have sold him any software... ;-)

Apollo went back to the BB booth with me, experienced The Yojimbo Demo, took a couple pictures, and went back to work. Nice to meet you finally, Apollo!

Bare Bones took us out for a huge steak dinner at Harris' Restaurant. A little too far to walk (I was told), but totally worth whatever it takes to get there. Wow. Second best steak dinner I've ever had, and certainly the best ever at a restaurant. This was a celebratory "family dinner," with Rich and Patrick, Naomi, Ciaran, and myself.


Saturday morning I packed my suitcase and caught a cab. There were five people in line ahead of me for the cab, but they all got on a shuttle.

Took the taxi to Rich's hotel to pick him up, and then to the airport. So far, it was all smooth...

Airports Schmairport

My itinerary said United Airlines, but when I tried to check in with United they told me I was supposed to go to US Air. GRRRRRRRRR. That's in another terminal about 500 miles away. So I said goodbye to Rich and hurried over there (though I had plenty of time).

Check-in took forever because my bag was overweight. This also cost me $50. It took them 20 minutes to print the receipt for that $50. This meant that by the time I got to the security line, I was already pretty frustrated.

Beep! That's me, trying to go through the metal detector.

"Sir, you'd better take off your watch and your belt. If you beep a second time, we have to do a personal inspection." That sounded ominous.

Beep! That's me, trying to go through the same metal detector with a tiny, forgotten pillbox in my pocket. I had to strip down to just shorts and t-shirt and stand in a phone booth which is rigged to detect eplosive residue. After that, the "personal inspection." I had to stand with my arms out the sides, palms up, while they wanded me from head to toe. This is all done right out in the open, of course. For your protection.

I checked my anger. Humiliation is the order of the day when you fly, now. It's the next best thing to security!

On the flight to Philly, I sat next to a Java programmer who was very jealous of how fast my MacBook Pro could wake from sleep (he had a Dell), and an old consultant to the printing industry who knew all about the startup of the RR Donnelley Lancaster West plant (which is where I met Corinne). He even thought he recognized her picture.

Philly to Providence was just a 40 minute flight, and I sat next to a couple who cuddled and made out the entire time. Touched down in Providence just a few minutes early, and walked straight to the baggage claim...

... and right past Corinne, who stood there looking amused. I realized what I'd done just a second too late. ;-) (In my defense, I was expecting her to be waiting for me outside, and I was trying to read the signs to see where my bags would come in.)

Thank you, Bare Bones, for letting me help out at the booth. It was a great week! (And it's even better to be home!)

Monday, January 8, 2007

Flight to SF, Dinner with Rich and Friends™


The flights from Providence to Washington/Dulles, and from Dulles to SF, were exactly how you want flights to be: utterly boring and uneventful.

Thai Food

In fact, everything yesterday was boring except for dinner! I'm staying at the Marriott San Francisco, but Rich is at the W. So after I was settled in and caught up, I walked over there so we could figure out what to do for dinner.

The W has a slightly bizarre lobby. It looks like the entrance to a nightclub. I told Rich that it looked like they were sizing people up as they walked in, to decide if they were dressed well enough to get into the club. About an hour later the third (of four) for our dinner party showed up, and he also said that it looked like a night club! (I even walked most of the way around the building trying to find the real entrance.)

Rich, of course, has a ton of friends out here right now as he's been in the Mac software business (and successfully) for a long time. So I'll just consider myself lucky that he was able to go to dinner with me/us last night: doesn't look like that will happen again until (perhaps) Thursday.

The dinner party of four consisted of Rich, Ciaran (another friend of Rich's who will be helping out at the booth), someone who used to do the Bare Bones marketing but whose name I can't currently remember (sorry!), and myself. We went for Thai food.

On the way out of the hotel, Rich asked the concierge where a certain Thai restaurant was that he remembered from years past. "It was a little hole-in-the-wall place up on such-and-such a street..." The concierge didn't want us to go there. In fact, he repeatedly recommended something closer, and in the end he actually said, "It's much nicer, but I think you'll like it anyway." I repeated that twice after we left the hotel, shaking my head. What a snot.

Still, we went where he recommended, and the food was good, and served very quickly. There didn't seem to be any waiting at all, but we were discussing a tentative plan for World Domination (via fobs and keys, of course) so the wait may have just passed very quickly.

Rich has a picture of the dish I ordered... it was very pretty. If he sends it to me, I'll update this post.

After dinner we all went our separate ways, and then I went to bed.


This morning I went down to the buffet (at the Marriott's "Garden View" restaurant) for breakfast. Wow! The food was good, but the wait staff was amazing!!! There were at least two staff people (in vibrant, cobalt blue shirts) per guest. Seriously. But they were all very good at not getting in the way: when I walked from my table to the buffet, they always stepped aside or changed course, so their numbers were never a problem. And they were all very friendly... lots of "good mornings" and smiles all over the place.

(I'm not a big fan of formality, nor the effort to make the guest feel like royalty, but I admit that their almost-choreographed behavior was impressive. Still, I prefer the genuine friendliness of our waitress at Snoopy's, and Corinne still makes the best breakfast I've ever eaten.)


We're setting up the booth this afternoon at 2pm, but that should only take an hour, maybe a little more. Brian is going to show up at about 3... I'd like to introduce him to Rich, if he's available, but then he and I are going to find something to do for the rest of the afternoon. The weather is nice, so perhaps we'll go to Golden Gate park (his idea).

Home Status

Corinne says she's doing ok at home, and managed a decent night's sleep last night (two down, five to go). Unfortunately, she woke up with a sore, puffy cheek. We knew she needed some dental work, but now it's urgent so she made an appointment for Wednesday. :-(

Mike's lawyer called my cell phone a few minutes ago to find out "what I wanted." I just "wanted" to know if he felt a letter of support for Mike & Shannon would help their case at all. He changed his tone very quickly: he feels it would, indeed, be quite helpful. So now I know what judge to write to, but I still need to speak with Shannon's lawyer to make sure she feels the same way and to let her know to expect it.

Monday, January 1, 2007

Happy New Year, One and All

2006 was a good year for me and mine, in many ways.

To all of my family near and far, to my ecclesia here and worldwide, to all of my friends new and old, close or distant:

New Year!

Hoping 2007 will be even better, for all of us...

Saturday, September 23, 2006

Codeless Language Modules and Regex Madness

I've posted a tutorial for creating your own Codeless Language Module for use with BBEdit 8.5. Along the way it also looks at a fairly advanced topic related to regular expressions.

Some of my work with Bare Bones and BBEdit 8.5 involved a lot of regular expressions. Version 8.5 now supports "Codeless Language Modules" with regular expressions for identifying significant parts of a file (strings, functions, comments). I helped a few people produce these modules for their own use. For example, there was one for a home-grown language that is intended to be used with "Getting Things Done" task lists, and another was for use with newLISP files.

The challenge with the newLISP language was to write a regular expression that could identify functions, the function's name, comments, and strings. Anybody who's ever seen any lisp code knows this means (among other things) looking at a lot of parentheses.

In fact, this is a task that true regular expressions aren't up to. Regular expressions don't do matched, balanced sets of characters like open and close parentheses, where the contents of the matched set is allowed to contain arbitrarily nested pairs of the same.

(There's even a sidebar with a link to a little essay/article by Brian Andresen which he posted here on [tw] (but which we agreed shouldn't go out in email) on the subject of regular expressions and context-free grammars.))

The tutorial walks you through most of the steps involved in creating your own language module for the newLISP scripting language. At the end there is a link for downloading the finished product, and another for a template file to make it easier to create your own language module.

Since it's a BBEdit-related tutorial, the new standard disclaimer applies.

December, 2017
Sun Mon Tue Wed Thu Fri Sat
  1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Feb  Jan


Channel RSS: RSS Feed for channel

is Seth Dillingham's
personal web site.
Truer words were never spoken.