TruerWords Logo
Google
 
Web www.truerwords.net

Search TruerWords

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

Welcome
Sign Up  Log On
Saturday, May 3, 2008

Familial Update, and Grumpy Seth's Advice on Raising a Baby

We're still moving, probably in October. The landlord is still planning to sell this place. It's a little stressful as we've lived here over 9 years (will be ten years in October) and I really like the neighborhood. Still, if we leave the house for more than a few minutes, then we're probably headed for Westerly. Moving over there will save us five or six gallons of gas and many hours of driving every week.

Corinne seems to be looking forward to it. I don't think it's entirely because the kitchen she'll be getting is thrice the size of what we have now, but that's probably a big part of it. ;-)

Business has been decent this year. Back in December, one client sent me some money to pre-pay for some work "to be decided." Work with Bare Bones has been steady, and I finally produced a working (though incomplete) module for YAML.

Shannon is no longer working two jobs. The second job, at a Hallmark (greeting cards) store, was paying minimum wage and only giving her 12 hours per week, so after a few weeks she told them she wouldn't be coming back.

Instead, she's going to school! She got Pell grants and various other forms of financial aid to cover almost all the costs of going to the Connecticut School for Massage Therapy. She started this week. It takes (I think) 18 months to get her certificate, and when she's done she'll finally have a real, employable skill for a job that pays a lot better than retail ever will.

She'll be about half done with her schooling when Mike comes home in January.

Thursday I went to court with her in Waterford for a "status update" on her appeal to get custody back of her son Richie. Richie's father, Dick S., decided to contest it. We went to the court thinking that she was going to walk out with custody papers, and instead all we know is that this is going to take longer than we first thought. (That's good, as we've asked Shannon not to rush this. We're already doing most of the work with Lauren. Neither of us mind that, but we're not ready to add another kid to the house.)

Corinne wanted pizza on Thursday night, so I was going to take Lauren with me to get it from Olympic Pizza in Norwich. Shannon came home from work early because (in her words), she "didn't feel like working," so she went with us. On the way, we had a talk about her relationship with Lauren.

Had very late second thoughts about posting the rest of this, so for now I've taken it out. Sorry...

Monday, March 31, 2008

Other BBEdit Language Modules

Rich read the Why I Wrote a JavaScript Module for BBEdit story, but like everyone else at Bare Bones decided to respond to me directly instead of posting something on the site. (Jim Correia has been guilty of this so many times it's now an old joke.) Anyway, he suggests that list the other languages/modules I've added to BBEdit since the JavaScript module

They are, in no particular order:

  • Strings (for MacOS X developers)
  • Python
  • Markdown
  • SQL (five flavors)
  • Ruby
  • Java
  • TeX
  • Lua
  • YAML

My favorite is still the JavaScript module. My least favorite is definitely the Markdown module (see Markdown.pl's source code and look for the author's comment, "This is an aspect of Markdown's syntax that's hard to parse perfectly without resorting to mind-reading" and maybe you'll understand my issues with it.)

My second favorite is the Python module, because Guido van Rossum wrote the gold standard of language specifications. He doesn't just describe the language syntax with near perfect clarity, he also has implementor hints! It's like he was in the room with me when I wrote that module, telling me what I should do here or there. His work made my work better, and there have been very few bugs reported in the Python module since its release.

My second least favorite module is YAML, for the same (or opposite) reason. The specification is obtuse, repetitive, unclear and unrealistic. It's full of internal language which you can only comprehend by looking for definitions elsewhere in the document, and inevitably those definitions have more internal language. (I'm working on an update to the YAML module, and the authors of YAML actually admitted to these problems in several IRC chats we had in the last few weeks).

I have various other unfinished language modules sitting around on my computer, waiting for me to make time for them, but all of the above have been released with BBEdit 8.5, 8.6, or 8.7.

A New JS Mode for Emacs, and Why I Wrote a JS module for BBEdit

Stevey's Blog Rants: js2-mode: a new JavaScript mode for Emacs

For the OOD-loving and API-minded among you, the "beautiful" way to do syntax coloring would have been to finish parsing, then walk the AST using a Visitor interface, applying the coloring in a second pass. I tried it, and it was, as they say, "butt slow". In fact (perhaps not surprisingly) walking the AST takes exactly as long as parsing, so it was twice as slow as doing it inline.

So I bit the bullet and moved my syntax-coloring to happen inline with parsing. Fortunately it only introduced about 30 lines of code to the 4000-line parser/scanner, because most of the coloring happens in the scanner, at the token level. Go figure.

Steve Yegge describes (at length) his new JavaScript mode for Emacs. For much of the article he's talking about (trying to) parse the JavaScript file at the same time that he's applying syntax coloring. It's absolutely NOT a simple task, not by a long shot. He had the benefit of direct access to Brendan Eich (the author and maintainer of JavaScript itself) at least twice so far, but still describes how difficult it was. And this is someone many people consider a superstar programmer who has been working at Google for years.

Well, next to Conversant, my favorite-ever project is/was the JavaScript module in BBEdit. I won't go into all the technical details like Steve does, but I will say, "I feel his pain."

Thinking about this, I realized that I never wrote the story of how I came to be contracted with Bare Bones. With all the explosives experts, martial artists, photographers, and "connected" individuals at BB I need to be careful not to cross the lines of my NDA, but I think I can tell this story safely. ;-)

How It All Started

In early Spring of 2006 — almost exactly two years ago — I was doing a lot of work with JavaScript. Prototype was my new favorite toy, but 1.0 hadn't yet been released. My editor of choice was BBEdit, but I was frustrated that it didn't list the functions in Prototype.js (follow that link for more details, including pictures). I wrote to Bare Bones tech support to ask if they knew of any third-party, BBEdit, language modules for JavaScript.

The answer was "no," but I was told that a couple other people had asked about improvements to their JavaScript support. I wrote back to say that I'd like to take a crack at it, if I could only see "the source to the current syntax module." Hah. Yeah, like that was ever going to happen. "Could you send me some of the source to your app, so I can write something better?" (That's NOT what I said, but that's probably what it sounded like.)

After lots of email back and forth, on May 10th we had only reached the point where Bare Bones was "planning to update it in a future release." I'm a developer, I know what that means. So I wrote again, and said I was going to start my own language module (based on BBEdit's public SDK for language modules), and could they just send me their current list of language keywords?

A month later, Rich himself finally sent them to me. That was June 12th. I wrote back with a better list of keywords, and told him I was going to start working on my own module unless they told me I shouldn't bother because they already had one under development. They didn't, but Rich seemed to be trying to call my bluff: you go ahead and start working on it, and if you come up with something good maybe we'll work something out. (I've been on both sides of this discussion, and I know that usually nothing happens.)

Three days later, I sent them a copy of a fully functional JavaScript language module, written in C++. (Looking back, I'm all impressed with myself!) When I'm telling this story in person, especially if Rich is nearby, I like to say that they tried to call my bluff but found I wasn't bluffing. I still think there was a little of that, but mostly I think they just dealt with this nagging, mostly-unknown customer the best way they could: "go ahead and do your thing, and yes, maybe we'll work something out."

A few days after that I sent them another one, with some more features and some bugs fixed.

A few days later, I went to RailsConf in Chicago, and found out that lots of Rails developers were using TextMate. I'd barely heard of it! (Probably because I don't go looking for new toys very often when I have work to do.)

While at the conference, I talked to other JavaScript devs about their editors, and showed them what I'd done for BBEdit. I even showed Sam Stephenson, Prototype's author, at the same time that I was showing him what I'd done for custom events in javascript. Everybody liked it, and it was definitely better than anything else out there. I also asked people why they were using whatever editor they were using. Most of the Rails folks who were using TextMate were using it because that's what the top Rails guys recommended, and because it had really good integration with Rails itself.

I wrote up all this "research" and sent it to Bare Bones when I returned home.

Writing the language module, peppering them with lots of email, and sending in the research I did at RailsConf were enough to really get their attention. In early July (can't remember... July 3rd or 5th), Rich came down here and we had lunch at Costello's Clam Shack, right on the water. I got an early look at BBEdit 8.5, we talked about my 1,001 feature requests, and I signed an NDA with a handshake (and later with pen and ink).

Perhaps as import as the business that was done that day, Rich and I became friends (and have had a casual breakfast almost every Tuesday morning since then).

Wednesday, December 19, 2007

BBEdit 8.7.2 Released Today

Bare Bones just released version 8.7.2 of BBEdit. This is a free maintenance update for anyone who owns a license to 8.5 or newer. Here are the release notes.

I had a small hand in this update. In the release notes is a list of fixed bugs, two of which are mine:

  • Fixed bug in which TeX syntax coloring would get out of whack if "Color Math Strings" was turned off and the scanner encountered certain constructs in the document.

  • Fixed bug in which the JavaScript function scanner could crash on certain malformed (usually because of in-progress edits) constructs.

There's lots more good stuff in store (way more than just bug fixes!), but some of the fixes in this release needed to get into people's hands sooner than later.

(Remember the BBEdit Disclaimer.)

Tuesday, July 31, 2007

Working On Tools

Immediately after "retiring" from the Prototype Core Team, I became active (for the first time!) on the group and finally did what I was there to do in the first place. The next version of Prototype (1.6) will have custom events. The custom events code in 1.6 doesn't look much like the code I described in my essay a year ago, but it's built on the same idea: piggyback custom events on one of the browser's built-in events. (The custom events code in 1.6 was written by a number of people, not just me.)

Anyway, the real point here is that I use Prototype for nearly all of my web projects now, and I contribute to its development. That's working on my own tools.

Plus, immediately after finishing my side of Prototype's new events code, I realized that the next version of Prototype didn't look quite right in BBEdit's function popup. (Some objects were listed as [anonymous] when they should have had names, and some class methods were listed as though they weren't contained by anything.)

So, I updated BBEdit's JavaScript module to fix that problem.

I'm rather proud of the JavaScript support in BBEdit, but (again) the real point here is that I love being able to work on my own tools! (See the BBEdit Disclaimer...)

The same is true for Conversant, which currently runs on Frontier, and which runs my site (and lots of others).

Being a tool-builder makes me feel like a real craftsman.

Friday, February 16, 2007

BBEdit 8.6.1 Released

BBEdit 8.6.1 was (finally) released yesterday (8.6 was released the first day of MacWorld). By this point, it should be no surprise to any of the [tw] regulars that I had a hand in this release, too. I like working with Bare Bones, and (more importantly) they seem to like me. Or at least my work. When I'm not breaking stuff.

Ahem. (When would that be, exactly?)

The 8.6.1 release notes have the full list of new features, so I'll just list the stuff I'm personally interested in, or which I was involved in writing.

  • Support for .strings files.

    This happened because a bunch of Rich's Smart Friends were hanging around the booth on the first day of MW, impressing me with their history. One of them whined about BBEdit not supporting "strings files" (which I hadn't heard of). That night, I whipped up a base implementation, filled it out a little more throughout the week, and had it finished a couple days after the show.

    I was going to release it myself as a free download, but it turns out lots of Mac programmers wanted it, so BB decided to bundle it. :-)

  • Improvements in the TeX module.

    I worked on the TeX module for 8.6, but TeX is a HUGE system. In fact, it's a whole family of huge systems (TeX, LaTeX, ConTeXt, BiblioTeX, etc.). Every time I look at it, I find more stuff we need to consider supporting in the TeX module. Most of those things are optional, "would be nice" features. The improvements that went into 8.6.1 were "duh, this should have been in there from the start" features. My bad.

    Having said that (with tongue somewhere in the vicinity of my cheek), I will say that I'm rather proud of the TeX module. It has been a tremendous amount of work, but it has enabled TeX editing/navigation in ways that I haven't seen in other editors (and it's going to be even better).

  • Fixed a JSP-related hang.

    I had nothing to do with this, but I did write the new Java module for 8.6 so I was afraid for a while that the hang was my fault. :-) (See previous comment about breaking stuff...)

  • Anything related to the Java module.

    Adding support for Java's generics was especially interesting.

  • Markdown Upgrades.

    8.6 included a new Markdown language module. This was truly the most difficult language module ever. There may be no less parseable language in the whole world. (It's really a convenience language, designed for converting into HTML via script, piece by piece.)

    In 8.6.1, I worked with Mistah Grubah to get the last of the bugs and his personal nits worked out. John wrote Markdown in the first place, and in fact he warned me in advance that writing the Markdown module for BBEdit was going to be a huge challenge. (Also see John's funny blurb ★.)


May, 2008
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 31
Mar  Jun


RSS: RSS Feed

Channel RSS: RSS Feed for channel

TruerWords
is Seth Dillingham's
personal web site.
Read'em and weep, baby.