September 20
by Rasmus Andersson, filed under software
I just released the first official version of DroPub . It’s a mute little OS X application which makes drop boxes and sending stuff to remote servers as simple as it gets — just put a file in a regu… Continue reading...
For quite some time I’ve been investigating and researching on how to best theme/skin/style a desktop application. Espresso from MacRabbit , available in public beta, takes an approach to themes I… Continue reading...
Colors is a simple application for anyone who needs to be able to pull colors from what you can see on the screen. Colors takes Apple’s basic color chooser (complete with “magnifying glass” to pull c… Continue reading...
A lot of software enables the user to extend it in order to enhance productivity and customize her work environment. An excellent example of this kind of software is TextMate . But I’m not going to… Continue reading...
In combination with the Tango OS X package release I created a D bundle for TextMate . There is already a D bundle available from Macromates bundle repository , but it is extremely simple. I… Continue reading...
Tango 0.99.6 has just been released. I’m now part of the team and is maintaining the Mac OS X bundle , which was previously announced here.
General highlights in this release:
A thread pool… Continue reading...
I just released a true Mac-style simple installer package which gives you a complete D with Tango -programming environment.
Included is GDC with libgtango together with a complete set of D… Continue reading...
I communicate a lot using files. Images, videos, screencaps, pdfs, etc - and there’s always problems sharing files over techniques like instant messaging, e-mail, etc.
My solution is very simple:… Continue reading...
The new version of Mac OS X has been released and here’s my somewhat incomplete review.
Spell-check can now operate multilingual, using several languages at once. Very appreciated as I write in b… Continue reading...
I’m a big fan of integrated non-intrusive, productivity-enhanching applications. One category which is especially useful for me is the automatic publishing of screenshots, making conversations about looks and state so much easier.
Mr Bulgur: The label of the “More” button looks totally skewed. Jean-Claude Which button?! You mean the home one? Looks good for me on Windows. Mr Bulgur See, it looks like the v-centering algo is broken on OS X: http://hunch.se/s/8y/9sd0h2fcow8gs.png Jean-Claude Ah! Yes, I’ll fix it in a blink of an eye.
I once purchased a license for Grab Up but the team bailed on us when the software broke. Moved on to TinyGrab but it’s too slow and often not working.
Since this functionality is rather trivial I looked around if someone had written an open source version, which I could simply adjust to my needs. None found. So I wrote one myself — Scrup.
Scrup is a simple little OS X application, or system plug-in, which sits in your menu bar:
When you take a screenshot, Scrup sends it to a web server of your choice. The web server then do something with the image (saves it, doh!) and returns a URL to the new image. That URL is then placed in your pasteboard, ready to be pasted somewhere. Scrup also keeps a list of the most recent scrups in it’s menu, for easy access at a later date.
I just released the first official version of DroPub. It’s a mute little OS X application which makes drop boxes and sending stuff to remote servers as simple as it gets — just put a file in a regular folder and you’re done.
Try it out — simply download, double click and create a folder.
Uses SCP (secure copy over SSH) and thus you need to add your SSH key to the remote server in order for things to work. A future version will introduce storing of passwords in the KeyChain.
It normally lives in the menu bar, but can live in the dock also.
Virtually unlimited number of folders can be watched and configured.
For quite some time I’ve been investigating and researching on how to best theme/skin/style a desktop application. Espresso from MacRabbit, available in public beta, takes an approach to themes I’ve been thinking about – CSS. Of course you should use CSS! Every kiddo knows it and those who don’t can quickly learn.
Colors is a simple application for anyone who needs to be able to pull colors from what you can see on the screen. Colors takes Apple’s basic color chooser (complete with “magnifying glass” to pull colors from other applications), and combines it with an easy way to copy common formats of color values (eg., #rrggbb, rgba(r, g, b, a), etc.) to the clipboard. Colors is free of cost, but not open source.
A lot of software enables the user to extend it in order to enhance productivity and customize her work environment. An excellent example of this kind of software is TextMate. But I’m not going to talk about TextMate today, but instead another very popular development tool for the Mac OS – Apple Xcode.
Xcode have had plug-in support during most of it’s life time so far, but the means for creating new plugins has been (and is still in many ways) something only Apple has. Documentation is extremely sparse and most of that which is available is outdated. If you bring up the “New project…” (CMD+SHIFT+N) you will find “AppleScript Xcode Plug-in” inside the “Standard Apple Plug-ins” category. However great this might sound, it restricts you to only fiddle with AppleScript, which in my point of view is just a pain in the ass. (AppleScript, that is. One might call it a necessary evil)
Writing a “real” plugin (using Cocoa, AppKit aso.) should be as easy as writing a normal Application, since a xcplugin is just a simple bundle like any other OS X bundle. What is different though, is that you probably want to fiddle with Xcode itself. (i.e. change the color of some text based on some rules, which for instance a language extension would do) Doing so requires knowledge (i.e. headers) about how to poke around. Unfortunately Apple does not expose these interfaces. Damien Bobillot maintains a (somewhat outdated) document called Xcode’s Plugin Interface in which he provides a package of private headers one must have, in order to use the DevToolCore framework.
However, I’ve been home reading Learn to Tango with D and after a while it started itching in my coding fingers – I re-wrote much of the TextMate bundle and it now has extensive support for all parts of the D language as well “knowledge” about all (non-private) exceptions, classes, structs and interfaces in the lastest version of Tango (0.99.6). What also might be considered a major improvement is the relatively vast number of helpers (snippets, command, templates). Click here for a list of the helpers. (as at the time of writing this) Integration with DSSS is supported through graphical build, run and clean commands. Inline documentation is handled as Javadoc thus writing comments in D makes use of all helpers exposed by the Javadoc bundle. This should probably be revisited in the future to comply with the exact specs of D’s version of inline documentation.
The D bundle for TextMate is now it’s own project. Download and install it directly:
svn co http://svn.hunch.se/rasmus/textmate/D.tmbundle/
open -a TextMate D.tmbundle
(Checking it out from the repository and importing it with TextMate)
If you like the color scheme in the screenshot above, why not grap a copy of it?!
svn co http://svn.hunch.se/rasmus/textmate/themes/ hunch-themes
open -a TextMate hunch-themes/Hunch-Dark.tmTheme
I just released a true Mac-style simple installer package which gives you a complete D with Tango-programming environment.
Included is GDC with libgtango together with a complete set of D and Tango documentation as well as about 50 different examples with complete source code. Installs into standard paths and does not interfere with your current environment (using isolating prefix /usr/share/gdc). This package does not require Apple Developer tools, even though it is highly recommended.
D is a general purpose systems and applications programming language. It is a higher level language than C++, but retains the ability to write high performance code and interface directly with the operating system API’s and with hardware. D is well suited to writing medium to large scale million line programs with teams of developers. D is easy to learn, provides many capabilities to aid the programmer, and is well suited to aggressive compiler optimization technology.
/* Shows how to create a basic socket client, and how to converse with a remote server. */importtango.io.Console;importtango.net.SocketConduit,tango.net.InternetAddress;voidmain(){// make a connection request to the serverautorequest=newSocketConduit;request.connect(newInternetAddress("localhost",8080));request.output.write("hello\n");// wait for response (there is an optional timeout supported)char[64]response;autosize=request.input.read(response);// close socketrequest.close;// display server responseCout(response[0..size]).newline;}
I communicate a lot using files. Images, videos, screencaps, pdfs, etc - and there’s always problems sharing files over techniques like instant messaging, e-mail, etc.
My solution is very simple: I make them temporarily available over HTTP. Everyone can receive the file, where there they are behing file million firewalls or not.
So I run a simple web server, have a folder called tmp and put a softlink to it on my desktop. Then when I need to send a file, I simply drop it in the folder (move or copy) and then send the link to the receiver(s). The only tricky and time-consuming part here is that you have to construct the URL yourself. And you cant really put sensitive material with names like Picture 1.png, Picture 2.png, ….
Well, this little AppleScript, which you attach to the tmp-folder as a Folder Action, creates a nice link for you and put it in the clipboard. It also adds a crc32 checksum to the beginning of the filename, just to add some security-by-obscurity as well as avoiding “file already exists…” dialogs.
The new version of Mac OS X has been released and here’s my somewhat incomplete review.
Spell-check can now operate multilingual, using several languages at once. Very appreciated as I write in both English and Swedish. Sometimes in the same dokument. Context-menu › Spelling and Grammar › Show Spelling and Grammar › now choose “multilingual” in the bottom drop down.
Spotlight has gone from totally worthless to fully usable, or even a great, feature. It’s fast (new mdimporter) and much “smarter” than before. Apple has even added keywords. I still use Quicksilver for launching applications but now using Spotlight to find e-mails, open files, looking up words and doing simple math.
Apple listened to the community and provided an alternative dock-style to the ugly “Shelf-dock”. To make it look better while in bottom-of-the-screen mode, write a setting to the Dock defaults: defaults write com.apple.dock no-glass -boolean YES;killall Dock
The Dictionary is a great tool and version 2 adds wikipedia, apple-tech and more to the list of queryable sources. It also integrates nicely with Spotlight; typing in spotlight queries the dictionary and displays the first hit as a spotlight-hit. Very neat. Dictionary also accepts the dict-protocol. Test it here: dict://hunch.
Screen Sharing in iChat works better than Apple Remote Desktop. And you get voice at the same time. Very neat. The only thing missing is a clear way to abort a session, if it’s your computer that’s being shared/controlled.
Spaces is neat but I need more time to evaluate it.
The default desktop picture is horrible. WTF Apple?! That’s Microsofts trademark, to fuck things up with ugly desktops. I instantly changed back to my greyscale version of “Aqua.jpg”
Dashboard sucks big-time, as usual. Just disable the whole thing and move on with a smile!
I’m not religious, but .mac synchronization feels like a blessing from above. It’s improved and now synchronizes all settings in *Library/Preferences. However, it’s not perfect. Some settings is best not synchronized. I would like to have greater control of what specific applications, or default domains to sync. Also missing synchronization of Library/Application Support as well as syncing arbitrary files.
The new Terminal.app may also induce religious feelings as it now has tabs (finally!), window styles, inspection panel and Cocoa-ish preferences. highly appreciated as it’s a tool in constant use every day.
Time Machine should have been in OS X since version 10.0. Not a day too late.
Partial screenshooting now features coordinates and size of the part being captured. Very useful in my line of work.
Time Machine
In my workstation I have several disks. Prior to Leopard I had the system installed on a 2-disk mirrored RAID-set. (If one disk dies, the other one has a copy of the data) Leopard features The Time Machine, which basically is an automated backup system. When a file changes, is added or deleted, the modifications are recorded to another disk. Time Machine also keeps a backlog of changes as far as the disk space on the backup drive permits.
Time Machine makes the following statement as how to prioritize backup:
Hourly backups for the past 24 hours
Daily backups for the past month
Weekly backups until your backup disk is full
I dedicated one of my previously mirrored disks to Time Machine and thus did not want to see it on my desktop. If you’re a true hackintosh user you have the developer tools installed which includes a nice utility for setting magic flags on files.
To make the drive TimeMachine hidden from the Finder, do this: /Developer/Tools/SetFile -a V /Volumes/TimeMachineIt will not show up anywhere in normal find windows, but do show up in Time Machines “select drive” window. Very neat. Works like a charm.