A Trifle Absurd
Matthew Morgan’s software notions
Currying and Function Execution
30 June 2005 at 10.11 • in Languages(Warning: potentially pointless language-design ramble ahead.)
Why is it that a curried function gets run as soon as it has all of its arguments? Perhaps it would make sense to separate the operations of giving arguments to a function and running the function.
Put another way, suppose you have a curried function of three arguments. If you give it an argument, you get back a (curried) function of two arguments, and so on. Wouldn’t it make sense that, upon giving it the last argument, you got back a function of no arguments?
But then, why would you not want to run such a function right away? Only two reasons come to mind: (a) it’s impure, and you don’t want to run the impure operation until later; or (b) it involves a lot of work, and you want to delay that work till it’s required.
Haskell doesn’t need no-argument functions, because there are no impure operations (so (a) doesn’t apply), and evaluation is non-strict (so (b) is automatically handled). But in a strict and/or impure world, it’s a different story.
Rejustifying Overleaf
27 June 2005 at 10.01 • in OverleafWhenever Overleaf development gets bogged down—like right now, for instance—I ask myself if the world really needs another text editor. For that matter, do I really need another text editor? I don’t know if the finished product is attractive enough to get me through the hard work of building it; still, I’ve put a lot of work into it already, which I don’t want to throw away.
And then there’s the question of the proportional-font-indenting feature, which was supposed to set Overleaf apart. I’m now realizing just what a hard problem that is. To make proportional-font code editing usable, Overleaf will need to handle internal indenting (e.g. lining up equals signs). The rules for that are bound to be far trickier than for simple left-edge indenting. Is it really worth all this work for a feature I’m not even sure I’ll like?
I’m trying to tell myself that even if that feature never happens, Overleaf will still be worth building. With highly configurable syntax highlighting coupled with an easy-to-learn config language, it will be really easy to whip up modes for new languages—or even multiple modes for the same language, to give you different views of the same code.
Disentangling the Projects
20 June 2005 at 18.14 • in ProgrammingWhen I got back into programming (after a few years’ hiatus), I knew there were three things I wanted to do: (1) create a personal information organizer, (2) build a full-fledged application, and (3) design a new programming language. For quite a while, I thought that one project (Trifle) would encompass all three goals. Now I’ve realized that each goal ought to be a separate project.
Trifle aims for the first goal—a useful way to organize stuff. Since it will build on system components like Spotlight, and tie together different applications, it makes sense for it to be a collection of scripts (at least at first). So goals 2 and 3 don’t make sense for it.
Overleaf is my application project (goal 2): a programmer’s text editor that aims to make proportional-font code editing a pleasant experience. As it’s intimately tied into Cocoa’s text editing system, Objective-C is the obvious language choice.
My language project (as yet unnamed) is the likeliest to fail, but I’ve been wanting to build a language since I was a kid, and now’s my chance. I’ll be steering well clear of the mainstream; I don’t see any point in making a language that’s just a thin syntactic veneer over the usual semantics. It should be fun, and, with any luck, useful.
It was inevitable, I suppose…
15 June 2005 at 18.21 • in JavaScriptSomeone’s gone and implemented a simple Unix-like system—wait for it—in JavaScript. The coolest (and/or most disturbing) part is the working implementation of vi.
Makes me think we need a new instance of Zawinski’s Law for software platforms, something like: “Every platform attempts to expand until it can run Unix…”
Having Fun
14 June 2005 at 15.32 • in GeneralI’m really having fun with the computer these days—a happy confluence of switching to the Mac and having good projects to work on. (Upgrading my work habits to the point where I’m seeing continual, visible progress has helped a lot, too.) I’ve rediscovered the joy of programming, that spark that caught fire in my imagination years ago.
It’s odd to realize that I’ve been programming computers for more than twenty-two years. I dove into programming in third grade, learning Logo on my own on my school’s sole computer, an Apple IIe. A couple of years later, I came home from a piano lesson to find a new Commodore 64 waiting for me (tape drive and all!), and hacked happily on it all the way through high school. My post-college programming experiences haven’t evoked that same kind of feeling—until now.
The Intel Mac and VirtualPC
9 June 2005 at 17.43 • in MacI told myself I wouldn’t add to the din of commentary on Apple’s switch to Intel chips, but I can’t hold it in. Here goes:
Steve Ballmer asked “What changed?”, and the answer at first blush is “Not much.” Apple will still make and sell their own machines, supporting the same peripherals, and you’ll only be able to run Mac OS X on a Mac. (Sure, some enterprising hacker will rig up OS X to run on a Dell, but all that will generate is a Slashdot story.)
But the move will encourage fence-sitters considering the Mac to make the switch. First of all, Phil Schiller said they won’t prevent people from running Windows on a Mac. So if you aren’t sure you’ll like OS X, you can buy a Mac, secure in the knowledge that even if you retreat to Windows, you’ll have some decent (if high-priced) hardware to run it on.
Or, if all you have is that one Windows app you still need, you could run VirtualPC (or dual-boot). This is the underreported Big News here: on an Intel Mac, VirtualPC won’t have to emulate an Intel processor anymore. That should make it fast enough for many more situations, and make it easy for the but-I-just-need-this-one-Windows-app crowd to switch.
Tags: Folders or Keywords?
6 June 2005 at 14.08 • in Tags(via You’re It) Tom Coates sketches out two tagging cultures—folder-style (think del.icio.us) and keyword-style (think Flickr)—and wonders whether keywords are gaining the upper hand.
Perhaps keyword tags are an artifact of the application domains involved, and aren’t so intrinsic to the idea of tagging. In Flickr, the items being tagged have no text in them, and so to get keyword search to work, you have to explicitly add keywords. In del.icio.us, you’re tagging URLs, which may have plenty of text but aren’t directly searchable; that is, you can’t ask Google to search only within pages you’ve bookmarked.
By contrast, if you’re tagging your own local textual data, and have full-text search available, you don’t need to tag with keywords. A simple search will do what you need, so there’s no reason to bother tagging, except for folder-style classification like “toread”.
Of course, now and again you may want to label something with a keyword that its text doesn’t contain, and there will still be other sorts of things (like pictures) that need keyword tags. To quote my own comment on Tom’s post: “The beauty of tagging is that folder tags and keyword tags can coexist in the same system. I think that’s a big improvement over having folders in one place (the GUI) and keywords in another (the search box).”
Why Trifle?
1 June 2005 at 13.48 • in Trifle, TagsI can’t say I’m suffering from information overload: I don’t get a lot of email, I read fewer than 150 RSS feeds, and I don’t have many documents to manage. Yet I’m still excited about building Trifle, for keeping track of all that (and more). Why? Mainly for the cause of usability.
Computers suck. They’re a hassle to use (especially for non-geeks). The advent of the GUI has helped, but we still have a long way to go. I think that replacing folders with tags will be a usability win, and I want to test that hypothesis by building Trifle, while adding other goodies like versioning and search. I also believe that users should be given the tools to build their own UIs, extending the power of the spreadsheet to something more like a database, but without the relational-model overhead.
And yes, it’s not just about doing something noble for the users. I freely admit that I’m scratching my own itch: I want to build Trifle because I want to use it.