tulipemoutarde.be

Software Developer

Smalltalk, Swift, Java, Obj-C

@fstephany | Email | LinkedIn

I'm currently working at Ta Mère SCRL a small development shop in Belgium.

We mainly do mobile apps (iOS, Android) for clients. We also have a strong interest in Pharo Smalltalk and Rust.

logo Ta Mère SCRL

Global package cache & stdin, stdout, stderr on Pharo

18 May 2012 in monticello pharo smalltalk stdin tips 

When loading a package with Monticello, a copy is cached in the directory ‘package-cache’ in your image folder. This is super useful when you need a package that you already have downloaded. Unfortunately, this cache is limited to the image directory. If you need that package in another image which is in another directory, you’ll have to redownload the package.

Here’s a little trick to have a global package cache:

MCCacheRepository default directory:
  (FileDirectory on: '/home/fstephany/package-cache/')

Of course, adapt the path to your configuration. Thanks Mariano for the tips (original discussion).

Another super useful things is the ability to send stuff to sdtin, stdout and stderr. I don’t know if it was present prior Pharo 1.3 but I’ve just discovered how to play with the standard streams:

FileStream stdout nextPutAll: 'Yopla'

Browse the class side of FileStream for more ;)