pharo

How can I easily change to native fonts in Smalltalk Squeak/Pharo

With every new Squeak image, I immediately change the fonts to some native version. It is a lot of mouseclicks and I want to script the proces. ...

Installing Magma and LPF in Pharo

I've been trying to install Magma in Pharo, but have had absolutely no luck. This is the stuff I've tried so far: Installing with Monticello from squeaksource.com/MagmaTester -- Syntax error in MaObjectSerializer >> setUpClassDefinitionProcessing. Installing from Universe -- the image hangs, apparently getting stuck in an infinite redi...

Magma, GOODS, GLORP, or something else?

So I've been using Smalltalk for about 6 months now (Squeak and Pharo), mostly doing data analytics, and I'm about to start my first Seaside app. So my question to all you Smalltalkers out there is, what is your favorite persistence solution? I've been looking at Magma, GOODS, and GLORP. I'm a long-time python hacker, so I get ORM, but i...

Is there a script that turns a Pharo core image into something more useful, that would include an OmniBrowser?

Hi, I cannot use the most recent dev Pharo release because of some strange issues with the compiler built into Pharo. Well. I was wondering if there is a quick way to install all the nifty extras into Pharo that the core image misses, as compared to the dev image. Cheers, Niko ...

Invoking shell commands from Squeak or Pharo

How can you invoke shell commands from Squeak and Pharo? Do these environments have anything in them like the system() function in certain unix languages to run external shell commands, or the backticks (can't make them here do to the editor, but what you get when you push the key left of "1" and above "TAB") to capture the output of com...

Migrating from SUnit to Phexample

Hi, I'm trying out Pharo's Phexample and I like it, but it feels clumsy to have half my unit tests in SUnit and the other half in Phexample. Does Phexample have like an import feature for my existing tests? ...

How to find the current stack?

Hi, in Pharo, how can I find the currently evaluating stack? ...

How do I copy and paste an error message in Pharo?

Squeak was once innovative by giving people more than a dull error message: a debugger and go figure out! However, nowadays there's a google, and now it'd rock to copy paste the error message, which is typically served as the title of a debugger window. How can I copy and paste that error message? ...

Pharo Gofer, can it fallback to local package cache when offline?

Can I tell Gofer to fall back to the local package cache when no internet is available? For example such that I can use Gofer it squeaksource: 'CodePhoo'; addPackage: 'CodePhoo'; load to setup an image when offline on the train? (In that case we can be sure that the packages are in fact available locally from a previous i...

How do you set the class of an object to something else?

Hi, I've seen this recently and now I can't find it … How do you set the class of an object to something else? --Update: Well, in Pharo! Like: d:=Object new. d setClass: Dictionary. Only that it isn't actually setClass. How can you modify the class pointer of an object? ...

Smalltalk web app deployment on headless Linux server

We wrote a small prototype web app using Pharo and Seaside and we want to now demonstrate to the suits that the app can be deployed into our standard Linux build. We use a mix of CentOS, Ubuntu Server and Gentoo which are run headless since most of our apps are JAVA/Apache based. Only port 80 and 443 are open to the outside world. What ...

Working with Excel files in web app frameworks like Seaside

Ive been reading about seaside and like the sound of it but i cant see an easy way for handling data files, primarily importing Excel. Of course csv files would be more straight forward, but are there any ways to import the various Excel formats (xls,xlsx) without writing your own file parsing routines? I've heard that the need to open...

What is the difference between a Squeak/Pharo Trait and a Newspeak Mixin?

So Squeak/Pharo support Traits and Newspeak has Mixins. What is the difference? Traits have no instVars but Mixins have? ...

What is the "best practice" portable way of Symbol using in Smalltalk?

What are the "best practice" rules for using symbols in Smalltalk in a portable way? I use squeak and pharo mainly and I know they both allow 'foo' = #foo and #foo = 'foo' to be true while other Smalltalks don't. I understand Symbols are for identification and shouldn't be used in place of strings. But is it at least safe to assume that ...

Browser that does refactoring in Smalltalk Pharo?

The Pharo dev image ships, by default, with a browser that doesn't seem to have any refactoring abilities. What's the most convenient way to transform a fresh Pharo image into something more useful? ...

Could SqueakNOS or PharoNOS made to run an iPhone or iPad to Form a DynaBook?

Not considering legal issues I would be very interested if it would be possible to run one of those on the bare metal of the iPad/Phone ARM-Architecture. ...

How to halt only if shift is pressed?

Hi, in Pharo I'd like Object>>halt to halt only if shift is pressed, so that I don't break down my image. How do I do that? So, for example, I'd like to be able to add a self halt. into Array>>add:, without losing my image. ...

Is there a dependency injection framework for Smalltalk?

I'm running Pharo and I'm just in a use case that sort of screams for Dependency Injection à la Guice. Is there something similar for Smalltalk? I understand that you can sort of do it all by foot, by just passing in your dependencies explicitly. But that feels awkward and verbose to me. ...

Is Pharo just a repackaging/rebranding of Squeak?

I'm trying to learn some Smalltalk. First found was Squeak, but since it has been removed from Gentoo ebuild tree because of security problem, so I decided to find an alternative. Then I found Pharo through Seaside project, after I downloaded Pharo 1.0 package, there are actually a SqueakVM inside! So, my question is: Is Pharo just a r...

I need a dictionary-like mapping between characters and other kinds of objects. Which class would be best?

This is in Squeak/Pharo. If I want to have a mapping between Character objects like $a and $b to other kinds of objects, and want to look up those other objects based on the Character, what is the best class to use? Dictionary is an obvious choice, but seems wasteful to be hashing character objects which are basically already numbers. I ...