Chocolat

Screen Shot 2014-01-07 at 4.46.16 PM
Chocolat is an ambitious programmer’s text editor, but it falls short (at least right now) in lots of little ways. E.g. integrating web-based documentation is a nice touch, but what about jQuery?

I discovered Chocolat by accident a month or so back. I can’t exactly remember how I learned about it — I saw a reference to it when reading the documentation of another product I use (I think it might have been Ulysses III) and so I gave it a spin. There was — and remains — a terrible problem with the way Chocolat identifies symbols in Javascript files, and I got into a bit of an argument with one of the developers on github over it, and set it aside. The thing is, Chocolat is an opinionated piece of software, and the downside of that is that one might not like all the opinions. E.g. in their FAQ is the question “will you add a minimap?” the answer to which is “Never!” That said, I like most of Chocolat’s opinions.

Well, there’s a new MacHeist “nano” bundle out and it’s particularly interesting for developers since it includes Hype (the would-be HTML5-based Flash replacement), Chocolat (a new programmer’s text editor which has a lot of potential), and — if some unknown number of people buy the bundle — PaintCode. I should mention that I bought the bundle for PaintCode and then realized it wasn’t actually included. Grrr. Oh well, Chocolat for $20 is actually a pretty good deal.

Here’s what differentiates Chocolat from my two favorite text editors (BBEdit and Sublime) right now:

Chocolat's symbol map is great when it works.
Chocolat’s symbol map is great when it works.
Chocolat tries to show a "symbol map" of your source file, but can't cope with code modules wrapped in anonymous functions (which unfortunately means most well-written Javascript library code). Note the empty rectangle where symbols should be.
Sadly, Chocolat can’t cope with code modules wrapped in anonymous functions (which unfortunately means most well-written Javascript library code). Apparently there are no functions in this source file.
  • Chocolat displays a symbol map (i.e. a list of object and function definitions you can use for quickly navigating source files) — the map is nice, but functionally it’s inferior to BBEdit (which can find symbols declared inside anonymous functions). Espresso remains the best in this respect, since it not only finds all the symbols you could ask for, it displays a nice symbol map too.

Screen Shot 2014-01-07 at 5.03.38 PM

  • Rather than giving you the choice of viewing two files side-by-side or one file, Chocolat lets you look at as many files as you care to side-by-side simply by selecting them.
  • Chocolat attempts to autocomplete Javascript (and does a pretty good job of it, including inferring the expected types for function parameters, and allowing you to tab around auto-inserted method calls TextMate-style). The only downside is that only works on currently open files. I imagine it’s even better with Obj-C (but haven’t tried).

Screen Shot 2014-01-07 at 5.07.14 PM

  • Chocolat attempts to integrate Safari (complete with debugging tools) by displaying it side-by-side with your code. This works pretty well.
  • Chocolat attempts to provide integrated documentation (e.g. select queryGetSelectorAll in a Javascript file and hit Command-Shift-J and it will look it up on MDN and show the documentation side-by-side with your code.
  • Chocolat does not attempt to integrate source control (git, hg, svn, p4, etc.) — I actually like this because I don’t want my text editor to do source control.

 

8 errors. Thanks.
8 errors. Um, ok. Thanks, I guess.

 

  • Chocolat is scriptable via Node.js. (Sublime is scriptable via Python, which is awesome too, but doesn’t happen to be the language I code in every day.) So far the available “mixins” seem pretty primitive (e.g. the jshint mixin tells me that there are “12 errors” in a file, but gives me no clue where or what they are).

For a while I thought Chocolat was a bit sluggish, so I started checking for signs of bloat. I did a quick comparison and BBEdit is actually the leanest of the three editors at 26MB on disk; Sublime 2 is 27MB, Sublime 3 is 28MB, and Chocolat is 34MB. Espresso, incidentally, is 18MB. But it turns out that the problem is I was using a “slow monitor” (i.e. my third monitor which is hooked up using one of those USB dongles). After comparing Chocolat, BBEdit, and Sublime on this display I concluded that BBEdit is even more awesome than I realized (because it appears to do minimal screen updates when scrolling), Chocolat is not bad at all, and Sublime is actually the worst. Again — avoid using USB-powered displays for editing text and you won’t care.

So here’s how it looks right now: Chocolat has the potential to become my favorite text editor since it’s heavily based on Javascript which means anything it doesn’t do well right now I can probably fix if I care to. BBEdit is the most polished, but the hardest to customize. Sublime remains — of course — the coolest, although given that Chocolat has support for both side-by-side editing, supports TextMate themes and snippets, and has “vim mode” it might take that crown, at least on Mac OS X.

But, Chocolat’s multi-file search is far inferior to BBEdit’s (it’s about on par with Sublime’s), its Regex support is also signficantly inferior to BBEdit’s, and it has no diff support (whereas BBEdit is my preferred tool for resolving differences between source files) — although I’m perfectly happy to use BBEdit as a dedicated diff front end, and do my text editing elsewhere.

Chocolat ★★★★ is $49 normally, currently available as part of Macheist Nanobundle 4 ($20).

I may review some of the other apps in the bundle later. In particular I have strong — mostly negative — opinions of Hype and Intensity Pro.

Project Natal

In case you haven’t seen it, here’s a link to Microsoft’s Project Natal promo video. Basically, aside from not allowing you to roam around by walking, this is pretty much the “holy grail” of VR — body-based motion sensor, with facial and voice recognition as well.

Penny Arcades Take
Penny Arcade's Take

Already some “journalists” are suggesting this will beat Nintendo’s Wii at its own game. Well, d’uh. If all this stuff were delivered and worked as shown, it would crush the Wii like a bug. The point is, it’s just a “concept video” — much like John Sculley’s infamous Knowledge Navigator. Beating Nintendo at its own game would involve making sensible compromises to deliver an actual viable product, not dreaming up pie-in-the-sky fantasies and then hopelessly failing to deliver.

It’s a great idea. (It’s an obvious idea too — it’s the idea most VR people come up with when trying to dream up the ideal control system, before laughing and switching to more practical ideas.) I’d line up to buy one. Heck if they can do reasonably decent motion capture for one person with a fairly clean background with good lighting working I’d buy one. Remember, Sony released EyeTV something like five years ago — it was pretty entertaining for five minutes and then we all forgot about it.

One thing that really irks hardcore gamers — and this is why the Wii has essentially failed as a hardcore gaming platform — is imprecise controls. A martial arts game that has a 30% error rate is going to drive you completely nuts. (Again, as Tycho at Penny Arcade puts it — the first time it fails to recognise Brenna’s voice is the last time she’ll use it. Trivial Pursuit has ended in fistfights over the interpretation of answers — how do you think people will like it when the outcome hinges on vaguely reliable voice or motion recognition?)

The thing is, Microsoft (like Google and Apple, and maybe even Sony) is the kind of company that has so many smart people working for it in various nooks and crannies that it seems just possible they could pull it off (or near enough). It does kind of tie in with some of the other imaging work they’ve shown off (cough — more unreleased products), but a lot of the stuff in the video is just stupidly hard. Hard as in “mathematician hard”.

Still, I’d love to be proven wrong.

Spore

I didn’t get Spore Creature Creator when it came out, and I don’t own Spore. I possibly will buy a copy one day just to mess around with it, but I’m in no hurry. You see, I played this “game” back in 1990 or so. It sucked.

The fact that no-one in the media can remember anything should have stopped surprising and annoying me by now. Even Yahtzee seems to have missed the fact that before Spore and The Sims, but after Sim City, Will Wright did a game called Sim Earth. Aside from being technologically more primitive than Spore (it was 2d, for starters) it was essentially an attempt to do the same thing (evolution from single cell to interplanetary civilization) and while an interesting effort, it was an abysmal failure (both commercially and in every other way).

In all the hype leading up to the release of Spore I never saw anything to suggest that Wright had learned from the failure of Sim Earth. In essence, he’d added a whole bunch of eye candy to the same broken concept. Yes, everything is prettier now. And no, it still isn’t a game.