
Working on It (TextMate) - tortilla
http://blog.macromates.com/2009/working-on-it/
======
eli
I really like Allan and I'm a proud Textmate user, but I can't help thinking
about Joel's essay: Things You Should Never Do
(<http://www.joelonsoftware.com/articles/fog0000000069.html>) about how
rewriting software from scratch is almost always a huge strategic error.

Why is a complete rewrite implicitly being considered a good thing? Code
doesn't get stale, there's a very active community around Textmate 1, and most
people are just asking for incremental features, not something totally
different. If people wanted something totally different they'd surely have
ditched Textmate by now.

~~~
dgallagher
I think so long as 2.0 maintains backwards-compatibility with 1.x (possibly
include 1.x with the 2.0 app?), and it doesn't hamper at all from the user
experience, a re-write might be a good thing. Or, allow easy plug-in migration
from 1.x to 2.x (kinda like what Python did going from 2.0 -> 3.0).

There are plenty of examples where complete re-writes, or partial re-writes,
have led to bad things. Windows Vista and Winamp 3.0 come to mind.

Good examples include Mac OS X, Linux 2.x (I believe this was a major re-write
over 1.x - could be wrong as my Linux history isn't up to buff). Starcraft was
completely re-written mid-development (originally it was built on the Warcraft
II engine, which didn't scale).

I would tend to agree with you, though, that major re-writes typically yield
worse things. But, that depends a lot on the product, its audience, and the
developer. Perhaps Allan, who has likely been writing code for a very long
time, knows of some bottlenecks and what-not that he feels should be
incorporated into 2.0, which necessitates a total re-write.

If worse comes to worse, the 2.0 codebase bombs and 1.x continues going on
strong. That's exactly what happened to Winamp 2.0 when 3.0 came out.

And I should mention, to clarify any possible bias in my opinion, that I'm a
very happy Textmate user. :)

~~~
Zev
OS X wasn't a complete rewrite. It was a "Our rewrite is going to hell, lets
buy a new OS to use." Go look up the history of Copland from Apple, its mildly
interesting.

~~~
tolmasky
Its a rewrite in that they threw out nearly an entire codebase and built it on
top of something different. If tomorrow Microsoft said "lets get rid of Vista
and build something new on top of Ubuntu", I think it would be fair to call
that new version of Windows a rewrite despite them not having written the
underlying code. Also, lets not forget that a fair amount of work
(understatement) went into Mac OS X post NeXT.

~~~
rbanffy
I think this stretches the definition of a rewrite a little beyond the point
it should break.

OSX is more like a rebranded descendant of NextStep/OpenStep, just the same as
a would-be Microsoft Windows 10 derived from FreeBSD code.

------
crux
A surprisingly thoughtful post. This is a non-unknown genre—the stagnant
software mea culpa—but I think he strikes a good and elegant tone. On the one
hand, it's rare for a developer to acknowledge that they've been remiss in
maintaining public contact, and even to enlist outside help for that specific
purpose. But at the same time, he's obviously not at all concerned with
letting actual releases of the software dry up while he methodically
refurnishes the whole app. For a really hyped-up application like Textmate,
whose users are going to be quite vocally clamoring for both their own pet
features as well as beta and alpha releases ASAP, that too is impressive.

Of course, I've long since found my home in MacVim, so maybe I'm simply
enjoying my lack of expectations from him.

~~~
jrockway
_For a really hyped-up application like Textmate, whose users are going to be
quite vocally clamoring for both their own pet features as well as beta and
alpha_

This is why open-source editors have made closed-source editors all but
extinct. There are just too many things to do for one person, or even one
group of people.

~~~
eli
_all but extinct_

Microsoft Visual Studio seems to be doing OK

~~~
jrockway
This is an outlier, since the Windows stack is so closed in general. I think a
large number of VS users use it because they are forced to by their
environment choice (or employer).

I tend to think of editors like TextMate, emacs, and vim to be chosen by
people who invest some thought into making the decision, rather than by people
that are forced to use something for work.

~~~
eli
Perhaps it's an outlier in that the language is more closed than most (and
that this gives MS a pretty huge advantage over other IDE makers), but VS
really is the best environment for developing .NET. That's why people pay for
it, not because management forced it on them.

~~~
jrockway
The question then is, "Why the closed .NET stack" and not Java or Mono.

------
cpr
In Allan's defense, he's come up with the first real advance in text editing
for decades (his whole syntax scanning and bundle subsystems), and he deserves
a chance to show what he can do as a second act. I expect great things.

~~~
rbanffy
What is the breakthrough in the syntax scanning?

~~~
cpr
I don't know that I can do justice to the idea, since I'm no bundle-writing
expert, but see <http://manual.macromates.com/en/language_grammars.html> for
the details.

The basic advance over something like an Emacs-Lisp package is that he built a
declarative system (based on context-dependent regexps) for handling arbitrary
languages, rather than making you write all the code to do so from scratch.

And he built things in such a way as to be able to handle languages nested
inside other language contexts (e.g., Ruby inside HTML).

Couple that with a pretty powerful templating facility, and you have something
that advances the state of the art.

I don't think anyone else has really taken as fresh a look at text editing for
a long time.

~~~
jrockway
_rather than making you write all the code to do so from scratch_

Emacs does not make you do this. (setf font-lock-keywords '(("some-regexp" .
whatever-face-you-want-that-to-be) ...)). There are several other forms that
font-lock understands, including custom functions that do highlighting.

Emacs also has something called the "syntax table", which allows you to
declare what comments and string literals look like. Emacs can then use this
information to syntax highlight those elements, and not do other syntax
highlighting inside them.

cperl-mode uses this combination of features to correctly highlight nearly 99%
of Perl constructions correctly. (Keep in mind that Perl and C++ have the
dubious honor of not being parseable with a formal grammar, so it is somewhat
impressive that syntax annotations + regexps is enough to do a good job.)

~~~
cpr
Yes, I apologize for my sloppy statement.

I realize Emacs does a lot of the work for you. It's just that I've worked
with some of these mode packages over the years and have been impressed with
the complexity they embody and the size of the code involved.

Textmate seems to avoid most of that complexity with its declarative system,
and still give you syntax highlighting and auto-indenting, etc.

~~~
jrockway
This is mostly because authors can't resist the urge to also do something
"interesting" in addition to "just" syntax highlighting. imenu support for
example. (imenu is "tags without a tags table" for one file.)

If you look at cperl-mode, for example, syntax highlighting and indentation
support is only a small part of its line count. The rest is things like auto-
documentation of core features, including 100s of lines of documentation
strings for Perl core functions.

------
bcl
I use TextMate every day. I hadn't noticed the lack of posts because for me,
TextMate "Just Works(tm)". It is easily enhanced via python (or whatever your
favorite language) through its bundle system so I have no need to depend on
the developer to support my every whim. I'm glad he's working on TextMate 2
and starting to blog about it, but for me what I have works great!

~~~
mcav
You haven't run into crashes or been disappointed in its search feature?

~~~
swombat
I haven't. I use it every day, for a number of purposes from updating my blog
to working on the Woobius codebase (in both Rails and Flex/AS3), and I haven't
had any issues whatsoever. The global search-and-replace works great, too.

I'd quite like split-screen editing, that's my main bug-bear, but I've
actually structured my use of TextMate around that - I basically just have
several Textmate windows open. I've been meaning to switch to Emacs for that,
but I suspect that managing buffers (and making sure they end up in the right
pane) will take as much effort as dragging a few windows around.

~~~
mmc
"but I suspect that managing buffers (and making sure they end up in the right
pane) will take as much effort as dragging a few windows around."

I think you'd be surprised. In my experience I have a fixed set of windows
(not os windows, but panes, as you called them), and easily and quickly switch
between them with Iswitch-buffers:
<http://www.emacswiki.org/emacs/IswitchBuffers>

this add-on gives you incremental-search to choose among open buffers, and
usually it only takes a couple of keystrokes to get the one I want - so
instead of moving the mouse around and clicking somewhere small and dragging
things around, I am back in business after something like 'C-x b sh' -
control-x, b to invoke iswitchb, and 'sh' to get me to my shell buffer...

~~~
swombat
The problem I think I'll have is not so much the actual switching of buffers,
but making sure they end up in the right pane when first opened.

------
a2tech
I'm not sure it matters any more. TextMate is a wonderful product and compared
to other editors at its time of release it was AMAZING. But the developers
lack of attention to the product (publicly at least) and the long wait time
between the last public release has destroyed the lead TextMate had. These
days the options are almost endless for text editors on OS X-many of them with
all the great features from TextMate and encompassing all the great features
requested for TextMate 2. Komodo Edit for example is free, cross platform,
includes loads of language bundles, multiple tabs, remote editing (SFTP, FTP,
SCP), scripting and code completion. MacVIM brings all the power of VIM to the
OS X GUI. I don't bear any ill will to this guy-I still think TextMate is a
great product. But I think his slow movement has doomed the product in the
long term.

~~~
jacobolus
Both MacVIM and Komodo Edit have been around for years, and haven't really
changed much while Allan has been working on TextMate 2, so I can't see how
that's relevant.

~~~
holygoat
According to their git changelog:

<http://repo.or.cz/w/MacVim.git?a=tags>

and their Google Code updates list:

<http://code.google.com/p/macvim/updates/list>

MacVim has seen a huge number of changes in the 2+ years that TextMate has
been under development: not least Leopard support, Vim 7.2 integration, and a
ton of interface and speed improvements. They're on Snapshot 45 right now...

------
carbon8
As someone noted on the post's comments: <http://en.wikipedia.org/wiki/Second-
system_effect>

------
llimllib
Anybody who considers split windows a "surface level feature" is on a
different wavelength than myself.

------
bradgessler
Please please PLEASE fix search. The awk and grep bundles suck. Coda has a
really great project wide search.

~~~
Oompa
I've asked allan about that in IRC, and he's said it's being worked on.

~~~
bradgessler
Will this be part of the "TextMate Forever" release or is it being considered
for a TextMate 1.6?

------
matrix
As someone who uses TextMate every day, I still don't really understand the
TextMate hype. It's a decent editor, but I still prefer UltraEdit (from back
when I was using Windows, obviously). There's just too many little things
TextMate doesn't get right.

Two examples that come to mind right away is the fact that TextMate cannot
handle large files (tsk, tsk... ) and the inability to edit in hex mode.

------
Oompa
I'm sure TextMate2 will be worth the wait :)

~~~
tortilla
Once he releases something, I'm guessing it'll be a lot like Christmas morning
for a lot of developers.

------
erlanger
Can't wait. However, I mostly use GVim now.

------
jpcx01
I'm just hoping MacRuby will enable the Ruby world to build our own open
source Textmate clone so we'll be able to ditch this abandonware piece of
crap.

~~~
cosmo7
> I'm just hoping MacRuby will enable the Ruby world to build our own open
> source Textmate clone so we'll be able to ditch this abandonware piece of
> crap.

Thanks for reminding me why I don't want to do Ruby.

