The more things change…

Many years ago, back in 2000 or 2001, I forget the exact date but sometime in that time period, I ordered some books from Amazon and had them shipped by UPS.  The shipping date came and went, and my books didn’t arrive, so I called up UPS, tracking number in hand, and asked them where my shipment was.

After looking it up, the lady on the phone managed to track down the problem.  “We attempted to deliver it and couldn’t find your house.” Continue reading ‘The more things change…’ »

I built a compiler today

I wrote a compiler at work today.  It took about 5 hours.

Granted, its input is very simple and nowhere near Turing-complete, and its output is in Delphi, not any type of machine language or bytecode.  But it definitely fits Joel Spolsky’s definition of a compiler. Continue reading ‘I built a compiler today’ »

AppWave: No individuals allowed?

I ran into a first-look review of Embarcadero’s new AppWave service.  It had a link to the beta registration, so I thought I may as well check it out and see what it’s like.  The link takes you to a pretty standard form… until you look at it closely.

On the form, there’s a required field labeled “Company Name”.  Below it are “First Name” and “Last Name” fields, not marked as required.

…what? Continue reading ‘AppWave: No individuals allowed?’ »

Wish list: Generics collapsing

One annoying thing I’ve noticed in building my script compiler is the way the use of generic collections tends to bloat up the size of your EXE.  I use generics for a lot of things; a compiler uses lists, stacks and lookup tables (dictionaries) all over the place.  When I was building it with DeHL, the compiler plus a very simple test frontend compiled into a 36 MB behemoth of a binary, and a quick look at the mapfile shows that the vast majority of that was DeHL collections.  Now that I’ve switched to the more simplified Collections library, it “only” takes 23 MB, a savings of about 33%.  But that’s still huge.  There has to be a better way.

Continue reading ‘Wish list: Generics collapsing’ »

RTTI Generation code now available

Over the past couple weeks, I’ve been working on refining and testing my RTTI generation and the scripting system I’ve been building on top of it, which I’ve decided to call RTTI Script.  I think I’m finally starting to get something ready for public consumption.  I set up a Google Code repository this morning for RTTI Script, but so far all it contains is the RTTI generation code.  The actual compiler and script executor still need some work. Continue reading ‘RTTI Generation code now available’ »

Run-time stack information?

Just in case you haven’t listened to it yet, Jim McKeeth over at Delphi.org posted a new podcast last week. He did an interview with Allen Bauer that apparently ran for about two hours, so he split it up into two parts.  The second part isn’t up yet, but there’s a lot of interesting stuff in the first one.  But one of the most interesting things actually came in the comments.

Continue reading ‘Run-time stack information?’ »

Dynamic class creation: moving beyond the theoretical

A few years back, I ran across this post by Hallvard Vassbotn.  (It’s a shame he stopped blogging, because he always had some very interesting stuff about the technical details of how stuff in Delphi works.)  At the bottom was a paragraph that really fascinated me:

On a more technical level it suffices to say that they use custom and extremely compact and fast data structures, tricks and hacks to be able to represent millions and millions of objects within the constraints of a 32-bit Windows system. Throw in the use of Physical Address Extensions, storing per-class information in “virtual” class vars to reduce object instance size, creation of classes and their VMTs dynamically at runtime (!!), pointer packing, multithreading, the list just goes on and on.

Continue reading ‘Dynamic class creation: moving beyond the theoretical’ »

Smaller, cleaner RTTI probably NOT coming

I got an email from Barry Kelly in response to my last post:

I can’t comment on this article as it requires the commenter to be
logged in, and registration is disabled.

There are no plans for a more compact RTTI format. I’d love for there to
be, but the backward compatibility concerns are simply too large.
However, as more code relies on higher-level RTTI constructs, the scope
for freedom there increases incrementally. That’s all I was trying to
say.

— Barry Continue reading ‘Smaller, cleaner RTTI probably NOT coming’ »

Smaller, cleaner RTTI coming?

One of the biggest complaints about the extended RTTI introduced in Delphi 2010 is the way it adds so much to the size of your EXE.  Well, in a recent StackOverflow answer, Barry Kelly hinted that the format of the basic RTTI structures in TypInfo.pas are “more likely to change from version to version now that it has a much higher level abstraction in the Rtti unit.” Continue reading ‘Smaller, cleaner RTTI coming?’ »

XE Update 1: you win some, you lose some

In my first look at Delphi XE, I wrote:

Oh, and apparently certain aspects of the compiler have slowed down.  Most things will compile about the same speed or even a little faster, but for really large projects (millions of lines) with complex interdependencies between units, you’ll notice some slowdown, and it’ll apparently get worse the larger your project is.  I timed it at work, on a project of about 3.5 million lines of code.  It builds in about 2 minutes on D2010, closer to 3 minutes on XE.  Bad, but still a heck of a lot better than the C family could do.  And apparently it has something to do with making Generics work right, so I can tolerate that.  Hopefully they’ll find some way to regain some of that lost speed in updates, though.

Well, I finally got around to installing XE Update 1 at work today, and I timed the build.  2:13. Continue reading ‘XE Update 1: you win some, you lose some’ »