TextMate IDE for Pascal

Recently I took an entire week out of my life to work full time on a TextMate bundle that could act as a full IDE for Pascal and the results have been quite successful. Already after a single I have been able to port my most recent project to TextMate and compile, debug and run the application all using TextMate and Terminal.app.

The entire bundle is powered by a series of small PHP scripts and some JavaScripts/HTML for the GUI which is web based, running directly inside of TextMate. It did occur to me that the entire GUI could actually be a real Mac application invoked from PHP but the web based GUI works well and was extremely fast to make because it uses scripting languages and HTML all of which are faster than making real applications. In fact, the entire reason for making the bundle in the first place was to save time developing IDE’s and spending more time of commercial software that isn’t going to put in the poor house.

For the time being I’m going to develop my next app using TextMate and see how it feels for the long term. I don’t want to abandon PascalGladiator but the effort it takes to maintain the project is just not making sense for the little time I have. Since the huge problems I had porting WASTE to NSTextView under PasCocoa and now PasCocoa to Objective Pascal I’m all spent on massive over hauls. I also made a big mistake by changing the DataBrowser wrapper API I have  (for Warehouse) which is going to take some time to apply to PascalGladiator. And finally, I’m going to have to port the entire project to Cocoa eventually and I haven’t really even started to learn all the details of Cocoa of how to build a full app like PascalGladiator with it.  Crashing bugs need to be fixed and updates so iPhone targets work properly but I can’t even get the project to compile without a good month of full time work. Ughh…

Until I feel motivated I will keep working on TextMate and make it the most complete solution it can be. Right now I’m pretty confident it can do everything we need and it’s a well supported and stable base to work from. Furthermore, I really suggest this to users using Xcode which is a hack for Pascal and offers less features than TextMate.

Until I make a real site you can download the bundle and learn the features by reading the manual at pascal.thealchemistguild.org.

The strong points:

  • TextMate is extensible so users can add snippets an extend the functionality of the IDE themselves.
  • Has all the major features you would expect from an IDE (error console, targets, syntax styling etc…).
  • Better than Xcode because:  more complete syntax coloring, jump to definition works, code completion uses symbols from the project, built specifically for FPC so it doesn’t break as easily.
  • Excellent snippet system from TextMate.

The weak points:

  • The single biggest weak point in the TextMate syntax system is that it can not dynamically read selectors from other files. If it did we could add symbols to a syntax file after compiling and TextMate could style those so we know which symbols are part of our project. As it stands now I made a bunch of regex expressions which try to guess where symbols are but it’s impossible to make it perfect for Pascal syntax so often we get black text where there should be some color. I really hope this gets addressed in TextMate 2.0.
  • TextMate really let me down on this: it only supports monospaced fonts!!! This is really bad news and hurts my eyes but I guess I’ll have to suck it up until TextMate 2.0 is released which may support proportional width fonts. I think the developer spent too much time on the terminal as a kid but surely he respects peoples needs for choice considering how he developed the entire app around this principle! He should put his entire website up in the Monaco font  if he thinks it’s so great, but of course he won’t because it would look terrible.
  • If you want to search for whole words you need to perform a regex search which is annoying to type \b all the time.
  • I still think there’s a way to achieve this but I wasn’t able to launch the application executable using PHP so it must launch via Terminal.app instead of reporting errors in the console. This may be a preference for some but I would like to keep it all in TextMate if possible.
  • You have to pay $40 to the developer of TextMate instead of free like Xcode or PascalGladiator.

What’s left:

  • I still think the application can be launched inside of the TextMate and return output the console instead of using Terminal.app but this hasn’t been a huge issue yet so I’m going to sit on it for a while.
  • The jump to definition feature only finds the first symbol in the project but there should be a popup menu which lets you choose from multiple definitions. Another web based interface could be made but I think making  a custom popup menu app that could be controlled from PHP would be better and not too much work.
  • Could a web based debugger interface be made for GDB which could be controlled via PHP? I don’t know how to make PHP work as a pseudo terminal (should be possible using standard UNIX system functions but I’m not skilled enough there) but even if that doesn’t work an intermediate Pascal application could be used in concert with the PHP scripts to make a usable system. I already made a debugger interface for PascalGladiator but it was terribly complicated to integrate into the editor and ended up being discontinued.
  • I just learned that TextMate has a basic plugin API which is enough to at least give you access to the Cocoa environment which means a toolbar to the window or items in the menu bar could be added.  Maybe not worth the time and I’m certain I could get enough relevant information on the state of the editor to be effective but it could be fun to attempt.
  • Xcode has a really nice feature that lets you lookup symbols in the Apple developer documentation which I want to implement. Apple recently changed the format of the directory structure but it can still be parsed I think.
  • Syntax styling is a real pain to get correct in all areas so I’ll be adding to this all the time I suspect.

If anyone wants to contribute by making Pascal apps that are controlled from TextMate, command scripts in any language, snippets or modify the GUI HTML etc… let me know!

TaskCard 1.3.8 and features in development

This was an overdue release but is out none the less. Some comments on the main features:
  • A long time frequently requested feature was finally developed: printing! This is only the first version so expect changes but so far you can print cards and entire sheets in black & white. I didn’t include color because I think people are using this feature just for reference (is that why you wanted them?) and it would be a waste of ink but let me know what you think about that. The scaling effect when printing single cards is not ideal but it was the easiest route for the first implementation of the feature. I hope in later versions to make TaskCard produce real .rtf files so the printing will be crisp like a real document.
  • There was a really annoying bug that was causing the close sheet button which hovers above the thumbnail image to vanish after editing any text so regrettably I had to remove it until I can resolve the issue. In the mean time you can contextual-click on the image to close the sheet but I will fix that eventually.
  • Dashboard activation really does behave like Dashboard now because there is a hot key you can set in the preferences which currently defaults to F1.

In the latest round of development I made some features which are complete or nearly complete and I will introduce them in upcoming versions when they are ready.

  • iCal support is finally in the works and will be ready for 1.4 or 1.4.5. The system is that you make a card which shares the name of an iCal calendar and all the tasks will sync. Tasks are just to-do items but if you assign a date to a task it will be become an event. This is really handy  for using the iCal alert system and you can sync tasks to/from your iPhone using the calendar app. The iPhone calendar app isn’t very ideal for entering tasks quickly but I bet there are other apps which sync with iCal that you could use for TaskCard also.
  • URL attachments are like file attachments except they hold a URL which will launch in your default web browser. When typing a task that starts with http:// it will turn into a URL automatically after you hit return.
  • There is a new separator item which will draw a horizontal line in the card to help you keep sections organized.
  • QuickLook is enabled for file attachments on Macs running 10.6 or higher.
  • This was also a long requested feature which I finally did some work on, which is saving and opening cards like normal documents. TaskCard was originally designed for temporary information but for project management and long time users the sheets were getting cluttered so the feature needed to be developed.
  • I developed exporting cards as text but I finally did importing so you can load plain text files as cards. The tab indents in the document are represented in the tasks as sub-tasks so it’s pretty powerful for importing text lists in cards.

Finally I would just like to say that I will without a doubt get undo support working soon. I know how annoying that is to delete a task and not be able to recover it. The feature is a little troublesome to implement so I have been lazy to make it. Sorry!

As for the iPhone/iPad versions… I’m really busy but this is on the schedule. Since the release of the iPad I’m much more interested in that because TaskCard lends itself perfectly to the design. However on the iPhone I don’t see an obvious way you’re supposed to fit all the cards on that tiny screen. The two systems seem to fundamentally conflict in my mind so if you have any ideas please let me know and I’d like to talk with you about them. I personally don’t use an iPhone because I like to be away from computers after programing all day so I could use some advice.

The best plan for TaskCard on the iPhone seems to be a little note pad type application that keeps notes while you’re out then syncs with TaskCard when you get home. Nothing fancy, just a place to keep your ideas so they’re not lost. But with the development of iCal sync it appears like we could leverage iCal to work with TaskCard and potentially even use a 3rd party app and not have to do anything at all. Please let me know if you know of any good iPhone apps that sync with iCal and maybe we can do a cross promotion together.

Lots of other requests like: find/replace, emailing cards, tab to indent sub-tasks and scrolling cards will have to wait for the later months. 😉 Thanks for all your comments and suggestions. Please keep them coming!

    PascalGladiator status report

    PascalGladiator is long overdue for a release to fix bugs and add iPhone device targets but has been delayed many months now. This is primarily because some heavy development I made to my DataBrowser class (for Warehouse) which broke many areas of PascalGladiator that are difficult to repair. In addition to that were upgrades to TObject (for TaskCard and Warehouse) which added some improvements like  modern reference counted memory, object archiving/unarchiving and some Cocoa-like dynamic method/instance variable accessing features that all need to be implemented into PascalGladiator. I should have kept the old code for compatibility with PascalGladiator because now I can’t get the project to compile! Once the overhaul is complete PascalGladiator will more robust, stable and probably be promoted to version 1.0 after all this time.

    Pretty annoying and I’m not motivated to fix it but there’s too many crashes and bad memory use in PascalGladiator that must be addressed, not to mention iPhone support. I made some scripts for iPhone support already but until they’re implemented into the IDE they’re painful to use from the command line.

    Warehouse plans for 1.1

    Once again helpful users have been kind enough to share their thoughts with me so I know which direction to develop Warehouse in. Without a doubt the most requested feature is better status reporting during backups which means a progress bar. I agree 100% and it’s annoying to not know how much longer the task will take especially on large backups. I didn’t include this in 1.0 even though it was an obvious feature because it presented some technical issues with rsync but I’ll put in the extra effort this time to make sure it’s done right. 😉

    The second issue is little out of my hands but clearly needs some work. Some users have reported getting various warnings from the UNIX utility rsync which Warehouse uses to do most of the work. Warehouse will display these for you but I believe they’re not always useful and there should be an option to ignore warnings (by selecting them individually, not a global omission of all errors). However some of the errors users reported were preventing files from being backed up but unfortunately I can only provide limited support as they are not technically from Warehouse and I may not be familiar with them myself.

    Finally a lack of error reporting with scheduled backups needs to be addressed soon but oddly enough I haven’t received any complaints here so it may appear in a later version. If a backup fails during scheduling it will report it as completed even though rsync may have failed to complete the process for any number of reasons. I hope this hasn’t confused anyone yet!

      TaskCard review at MacWorld

      Not long after TaskCard 1.0 was released an editor at MacWorld contacted me about doing a little review for his “Mac Gems” section but it took until the release of 1.3 to finally see it happen.

      The rating of 3.5 out of 5 mice isn’t great but good enough for a 1.3 release and will certainly score higher in the future after more updates are made.

      Click here to read the full review.

      Warehouse Released!

      Today marks the release of Warehouse 1.0 (http://www.warehouseosx.com/).  Please send all comments and feature request that you may have, we love to hear these.

      Any people interested in supporting your native language by localizing Warehouse will receive a free copy and updates for life along with the glorious fame!

      Version 1.0 is the first step and already a few key new features are planned:

      • Fully bootable backups. I suspect this will be requested often…
      • FTP destinations. I have already developed a script for WebScripter which will make mirror copies of files on an FTP server and local disk which I will implement into Warehouse. The uploading/downloading will be slow like any FTP transfers but a handy tool for backing up files to remote servers.
      • ZIP archives. I’m not exactly sure how this will work yet but ZIP’ing archives makes a lot of sense since this is how people backup sometimes. Any suggestions are welcome.
      • Error logs. The backup log is handy for keeping track of backups that were performed in the background via scheduling but there are no reports of errors. This will be improved upon soon.
      • Multiple destinations. This feature will depend on people requesting it but I think backing up to multiple destinations at once would be nice for some scenarios.

      Please let us know what other features/improvements you would like to see to make Warehouse a better tool for your needs.

      Warehouse coming soon!

      warehouse

      A new backup application named Warehouse is currently in the final stages of development and planned to be released soon.

      As of  10.5 Leopard Apple has released a great backup utility called TimeMachine which will keep incremental backups of your entire hard disk on a schedule of your choice. This may be appropriate for many users but for myself it’s overkill and too much of a “one size fits all” solution, like the one button mouse I haven’t used in many years.

      Instead of relying on a single button, single backup interface Warehouse uses a task based system which lets you backup based on a task-per-task basis using a variety of backup modes (not just incremental archiving like TimeMachine) and unique destination devices (any mountable device even Macs connected via network). This means that you only backup the files you need, where you want thus saving time and disk space. The real power of Warehouse comes from setting up scheduled backups that run in the background (you can even keep the application closed if you want) so all your data is safely backed up while you work.

      As was mentioned Warehouse doesn’t just create incremental archives like TimeMachine but uses other modes as well such as: updating (only new files are transferred), bidirectional synching (both new files on the source and destination are transferred) and synchronizing (newer files are transferred and missing files are deleted on the destination). This makes Warehouse an ideal solution for synchronizing folders across Macs or on removable media like USB memory sticks.

      For only $9.99 you can get more control over how you backup your files.

      Please visit the website for more information.

      WebScripter on hold

      I’m sorry to say that WebScripter is officially on hold until a new direction for the application can be established. The current design is simply too large and complicated for me to maintain and has not competed well making the project far too expensive to develop. I have already started work on a smaller more robust design which has more in common with other popular tools but I don’t expect a release anytime soon since a massive overhaul is needed. Furthermore the Carbon API has been more or less totally deprecated and parts of the program will need to be rewritten in Cocoa, mainly the text editor which is the  most complicated part of the program.

      When the overhaul is done WebScripter will emerge as a smaller program with stronger core features and cheaper price tag probably about $20.

      TaskCard plans for 1.3

      I have gotten tons of feature requests all of which are great and I’m trying to steadily implement all of them over time, which will take some time. The version numbering is going a little too fast but the next version should be 1.3 (we’re on 1.2.6 as of writing this) and here’s what’s planned in terms of major features.

      • Dragging cards to other sheets. This has been a very popular request and has already been developed and waiting for deployment into 1.3. When you drag a card over a sheet it’s image will scale to size then fall into the sheet where it was dropped. Quite nice. 😉
      • File/URL attachments (or clippings is another possible name). This is being developed now and I’m not 100% decided on all the details but files and URL’s will be able to be dragged onto cards along with some text (not sure about this yet). Then clicking on the icon will open the file/URL as it would normally in the Finder. This was requested often also by users who wanted to associate a file with a task for reference. Really good idea if you ask me.
      • Navigating cards/sheets by keyboard commands so you don’t have to use the mouse.

      Those are pretty major feature improvements but also just below them are synching sheet files from Mac to Mac, iCal support and printing. These will probably have to wait until 1.4 but it’s possible one of them could sneak in.

      TaskCard now has Japanese and French localizations thanks to the support of caring users. Please support your language by helping to localize TaskCard.

      Btw, I have started to port the graphics engine TaskCard uses to iPhone so there will be an app coming out eventually but probably not for a few months yet.

      PasCocoaKit Deprecated

      This is old news already but PasCocoaKit has been officially deprecated in favor of the native compiler dialect named Objective Pascal. Please visit http://www.thealchemistguild.org/objp.php for more information on Objective Pascal including installer scripts and example projects in PascalGladiator.

      I spent more than a couple months working on this beast but at least most of the effort was placed into the Cocoa framework parser which has been used to support Objective Pascal so no real complaints. 😉 Now all Pascal users can enjoy making native Cocoa programs on OS X!