Updates

Missing Parser in Pharo 8

Loading Pier 3.2 in Pharo 8 fails with the error:

This package depends on the following classes:
  SHParserST80
You must resolve these dependencies before you will be able to load these definitions:
  SHParserST80>>#ranges

The problem is clear from the code:

SPHighlightedCode>>rangesFor: aString
	"Try to find out if this is a method, maybe with a class declaration. Otherwise parse as expression."
	| parser index string |
	parser := SHParserST80 new.
	parser classOrMetaClass: classOrMetaClass.

This is found in the NECompletion package, which is loaded in BaselineOfBasicTools & BaselineOfIDE.

The shout package is used for code blocks like this (taken from Pillar docs):

[[[label=script1|caption=My script that works|language=smalltalk
self foo bar
]]]

Unfortunately these square brackets haven't worked in Pier since before Pharo 5. Removing the shout package seems like a logical choice.

A second problem is the load order for the Seaside and Grease. For Pharo 7 it can be loaded in either order, but for Pharo 8 if conflicts are ignored, or #onConflictUseIncoming is used, then http://localhost:8080 brings up the error:

Internal Error: BlockClosure>> #fixCallbackTemps

Using #onConflictUseLoaded resolves this problem.

Posted by John Borden at 26 March 2020, 12:02 pm with tags Pharo, pier link

Teapot Tutorial

While working through the Teapot tutorial in Chapter 1 & 2 of Enterprise Pharo, everything worked well locally. When installing on the Digital Ocean virtual server, a library issue popped up due to 32bit Pharo:

root@ubuntu-s-1vcpu-1gb-nyc1-01:~# ./pharo Pharo.image printVersion
Error. Could not determine platform's libc path for VM.
Try forcing $PLATFORMLIBDIR in /root/pharo-vm/pharo, based on LIBC_SO.
Please report what works to pharo [vm-dev] mail list.
  LIBC_SO=
  DISTRIB_ID=Ubuntu
  ...
  System seems to be 64 bit. You may need to (re)install the 32-bit libraries.
root@ubuntu-s-1vcpu-1gb-nyc1-01:~# apt install pharo6-32-ui pharo6-64-ui
Reading package lists... Done
Building dependency tree
Reading state information... Done
...
E: The repository 'http://download.opensuse.org/repositories/devel:/languages:/pharo:/stable/xUbuntu_16.04 ./ Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Installing the 64bit of Pharo 8 worked well, similar to what was done for the example Pier install.

Posted by John Borden at 20 March 2020, 2:15 am link

Scratch to Smalltalk

The journalist Virginia Heffernan wrote a wired article titled Stemtrails:

The contemporary STEM curricula in lower schools seem, in fact, to have very little as a through line, unless you count the popular Scratch app, a production of the Siegel Family Endowment, which is heavily subsidized by Google and the Cartoon Network. The app lets kids learn loops and if-then blocks in a kind of baby programming language that no adult uses. It’s fun.

When reading the phrase "real languages", my first reaction was: We don't send kids down into salt mines either. If kids are using the same languages that are used in production today, should it surprise anyone that they don't have any new ideas?

For several years, I have been using Pier for years, but the Pillar project never seemed like anything more than an academic tool - it specializes in generating Latex for publishing in journals. After thinking on Virginia's quote I realized I had fallen into the same trap and ignored Pillar documentation. One benefit that I immediately gained after opening it was that I could use annotations instead of HTML for creating the above quote.

Several years ago, I wrote about principles learned using the EToy's Painting Tool, however there could be more done to move Scratchers to Smalltalk programmers where more principles could be discovered.

Posted by John Borden at 24 February 2020, 2:11 pm link

iPhone Hung on Apple Logo

After applying the 13.2 upgrade, I was dealing with a space issue when I restarted my phone, and it only displayed the Apple logo. I was still able to connect through my watch, but the phone screen was unresponsive.

Resolving it by restoring from a backup required the forth solution from this site:

  1. When your device is connected to the computer, open iTunes on your computer.
  2. Then on your iOS device, quick-press and release the Volume Up button.
  3. Now, quick-press and release the Volume Up button. 
  4. Finally, press and hold the Power button until the Recovery Mode screen (Connect to iTunes screen) appears.

It took several attempts to find the right timing, and a careful eye to see the latest backup, but it worked in the end.

Posted by John Borden at 3 February 2020, 3:47 pm with tags Apple, iPhone link

Pharo Starter Scripts

The https://github.com/jborden23/PharoStarterScripts repository contains several scripts used with Pharo, while I still use Pharo Launcher, there are some reasons not to:

  • It writes to ~/Documents, on my Mac this is takes iCloud storage
  • I've had problems starting it on Fedora, it doesn't seem reasonable for a Raspberry Pi

There are several projects similar to this:

The goal is to eventually improve the scripts used on https://pharo.org/download.

Posted by John Borden at 18 January 2020, 2:17 am with tags Pharo link
<< 1 2 3 4 5 6 7 8 9 10 >>