Pharo + VirtualGPU on Parallella

unnamed.pngHi folks, I dabbled around with the OpenSmalltalkVM and PharoV50 on the (https://www.parallella.org/).

Although most OpenCL samples do currently not work, because of some issues with the esdk on the Parallella, I can at least report that this combination works.

It might take some time until I figured the OpenCL errors out. The building of the kernels throws errors due to include path errors.

The screenshot of my Pharo image on the Parallella through a ssh X forwarded session. Cheers! Sebastian

Doing one step at a time

60307
19377 Pharo 6 Morph>>#showActions broken
https://pharo.fogbugz.com/f/cases/19377

19339 MethodAnnouncement should has methodPackage information and provide packagesAffected and protocolsAffected
https://pharo.fogbugz.com/f/cases/19339

19391 FuelPlatform-Core
https://pharo.fogbugz.com/f/cases/19391
60306
19365 remove dependency of Catalog on Nautilus
https://pharo.fogbugz.com/f/cases/19365

19367 testClassRespectsPolymorphismWithTrait does suppose full image
https://pharo.fogbugz.com/f/cases/19367

60305
19295 originAtCenter looks like deadCode
https://pharo.fogbugz.com/f/cases/19295

19372 MethodFinderTest is dependent>>#testSearchForAccessAtOne is dependent on result order
https://pharo.fogbugz.com/f/cases/19372

17771 Empty stderr/stdout files should be deleted on image shutdown
https://pharo.fogbugz.com/f/cases/17771
50764
19361 Morph>>#showActions broken
https://pharo.fogbugz.com/f/cases/19361

60303
18330 Fuel still has platform classes in Pharo6 like FLPharo11Platform.
https://pharo.fogbugz.com/f/cases/18330

19381 KMSingleKeyCombination should be not printed with forced uppercases
https://pharo.fogbugz.com/f/cases/19381

19382 #add:finalizing: in AlienWeakTable sends unexistent message #copyGrownBy
https://pharo.fogbugz.com/f/cases/19382

60302
19364 We need to be able to read utf8 strings from ExternalData
https://pharo.fogbugz.com/f/cases/19364

19354 FFIExternalStructures allways recompile its accessors in their first use.
https://pharo.fogbugz.com/f/cases/19354

60301
19331 ClassRepackaged and MethodRepackaged should be subclassed from ClassAnnouncement and MethodAnnouncement
https://pharo.fogbugz.com/f/cases/19331

19349 RPackageAnnouncement should be SystemAnnouncement subclass and work as other system changes
https://pharo.fogbugz.com/f/cases/19349

18881 ChangesBrowser executing refactoring changes in wrong order
https://pharo.fogbugz.com/f/cases/18881
60300
19360 Deprecated #selector call in MetacelloVersionConstructor>>#verifyVersionImportPragmas:definedIn:
https://pharo.fogbugz.com/f/cases/19360

19352 Conflict on package renaming if tag exists
https://pharo.fogbugz.com/f/cases/19352

19362 Make OSWindow as optional and unloadable
https://pharo.fogbugz.com/f/cases/19362

50763
18918 Typo on welcome screen
https://pharo.fogbugz.com/f/cases/18918
60298
19378 Rendering text in athens is broken (still not fixed)
https://pharo.fogbugz.com/f/cases/19378

19363 remove dependency of Rubric on SmartSuggestions
https://pharo.fogbugz.com/f/cases/19363

19275 Installing / Uninstalling Metalinks clears method list selection
https://pharo.fogbugz.com/f/cases/19275

19358 solve Nautilus-Versionner dependency
https://pharo.fogbugz.com/f/cases/19358

19373 MethodFinder class>>#methodFor: should provide sorted result
https://pharo.fogbugz.com/f/cases/19373

60297
19329 New SystemAnnouncement is needed to signal that class modification was completely installed
https://pharo.fogbugz.com/f/cases/19329

19303 Classes should define systemIconName instead of systemIcon
https://pharo.fogbugz.com/f/cases/19303

19359 ProtocolRemoved is not announced when Nautilus removes empty protocols
https://pharo.fogbugz.com/f/cases/19359
60296
19350 SystemAnnouncer cannot be reset in minimal/bootstrapped Pharo
https://pharo.fogbugz.com/f/cases/19350

19328 Undeclared ShortRunArray again
https://pharo.fogbugz.com/f/cases/19328

19326 failing test: testClassRespectsPolymorphismWithTrait
https://pharo.fogbugz.com/f/cases/19326

60295
19335 Syntax highlighting do not work on methods with primitives that uses “ec”
https://pharo.fogbugz.com/f/cases/19335

19340 Can not step over methods with meta links
https://pharo.fogbugz.com/f/cases/19340

19343 Spec is now dependent on FastTable
https://pharo.fogbugz.com/f/cases/19343

19351 ClassTagAnnouncement is needed to describe operations with class tags
https://pharo.fogbugz.com/f/cases/19351
60293
19348 apply automatic deprecation rewrite because of 19347
https://pharo.fogbugz.com/f/cases/19348

60292
19333 17 more tests failing due to MockSettings class(Object)>>doesNotUnderstand: #mocksystemsettings SettingTreeBuilder>>mocksystemse
https://pharo.fogbugz.com/f/cases/19333
60291
19338 Revert 18233 (improving Pragma API)
https://pharo.fogbugz.com/f/cases/19338
60288
19323 ClassRemoved should provide information about affected package
https://pharo.fogbugz.com/f/cases/19323

18233 improving Pragma API
https://pharo.fogbugz.com/f/cases/18233

19320 Improve MethodClassifier logic
https://pharo.fogbugz.com/f/cases/19320
60286
19251 Interval with step=0 is possible to create but most operations raise non-obvious exceptions
https://pharo.fogbugz.com/f/cases/19251

19290 helpAtCenter morphic property is only set to true
https://pharo.fogbugz.com/f/cases/19290

19297 Scrollbar lastPaneColor can be turned into an instance variable
https://pharo.fogbugz.com/f/cases/19297

19318 Add new Colors package to the BaselineOfPharoBootstrap
https://pharo.fogbugz.com/f/cases/19318
60284
19296 PluggableButtonMorph property lastState can be turned into an instance variable
https://pharo.fogbugz.com/f/cases/19296

19293 mouseOverBorderStyle property in IconicButton can be turned in instance variables
https://pharo.fogbugz.com/f/cases/19293

17456 use fasttable for the add to package MC repository
https://pharo.fogbugz.com/f/cases/17456

19313 Move Color to Kernel
https://pharo.fogbugz.com/f/cases/19313

19316 Integrate BaselineOfPharoBootstrap
https://pharo.fogbugz.com/f/cases/19316

60283
19299 Missing border after dragging out of a window group
https://pharo.fogbugz.com/f/cases/19299

18286 Provide notice of missing package description in CatalogBrowser
https://pharo.fogbugz.com/f/cases/18286

19309 RBSourceRegexRefactoring calls not existing method on RBClass
https://pharo.fogbugz.com/f/cases/19309

Towards true headless

Hello,

I am working on removing most of windowing code from the VM, and in trying to unify the platform specific code of the VM. In the MinimalistHeadless branch of https://github.com/ronsaldo/opensmalltalk-vm I made the following changes:

– Unified standard CMake building scripts for Unixes. I hate autoconf. I want to use them in Windows too.
– Refactoring the Unix entry points. I am trying to remove a lot of code for simplfying stuff.
– Null window driver for true headless.
– Optional SDL2 based traditional display backend for compatibility reasons, and because the extra Morphic worlds using OSWindow are a bit unstable.

So far I managed to run a standard Pharo 6 image using this custom VM in Linux. Windows and Mac are coming next. Hopefully this is going to fix the problems with duplicated events when using OSWindow in Windows.

I am also planning on making a standard interface for embedding the VM in an application, at least as a static library. With this new building system, this seems to be easy to do.

BTW. When I tried the minimalistic Pharo image, in a completely headless VM, I got the following error:

[ “Ugh …. now this is a biggie – a system that does not support
any of the display depths at all.”
Smalltalk
logError:
‘Fatal error: This system has no support for any display depth at all.’
inContext: thisContext.
Smalltalk quitPrimitive “There is no way to continue from here” ] in DisplayScreen>>findAnyDisplayDepth
DisplayScreen>>findAnyDisplayDepthIfNone:
DisplayScreen>>findAnyDisplayDepth
DisplayScreen>>setExtent:depth:
DisplayScreen class>>startUp

As a workaround, I am doing the following for ioHasDisplayDepth with the null driver:

sqInt ioHasDisplayDepth(sqInt depth)
{
return true;
}

In DisplayScreen class >> startUp we have the following:
startUp “DisplayScreen startUp”
Display setExtent: self actualScreenSize depth: Display nativeDepth.
Display beDisplay

Does it make sense, to always trying to create a display in startup time?

Best regards,
Ronie

New Animation Package

Hello,

I am happy to release the Animation package at last! http://smalltalkhub.com/#!/~ThibaultRaffaillac/Animation
This is a general animation system, which can turn any setter message into a smooth transition (provided the target value supports + and *Float).

Examples:
AnimationProperty new at: morph set: #position: to: 100@100 during: 2 seconds easing: #backOut.
AnimationProperty new at: morph set: #color: to: Color red during: 2 seconds easing: #linear.
AnimationProperty new at: morph set: #title: to: ‘tutututu’ during: 2 seconds easing: #linear.

Or equivalently (don’t choke):
morph position: (100@100 during: 2 seconds easing: #backOut).
morph color: (Color red during: 2 seconds).
morph title: (‘tutututu’ during: 2 seconds).

It basically sends the setter message repeatedly during the target delay, each time with a slightly different value. It should also work with Bloc, although the update mechanism depends on Morphic’s deferredUIMessage at the moment.

Cheers,
Thibault

ps: Thanks to anonymous contributor for the second syntax, it was a lot of fun – and evil laughs🙂

Chip8 Emulator

Pharo is a great community. Thursday I asked if we got an emulator for Chip8 (http://www.multigesture.net/articles/how-to-write-an-emulator-chip-8-interpreter) and I started to code it but got sick and Monday Henrik sent a little mail with a full implementation. Super cool🙂

http://smalltalkhub.com/#!/~Latsabben/Chip8

Do not let your kids get close to your keyboard and have fun.

| program emulator |
“C8Programs downloadGamesPackZophar.”
program := C8Programs programNamed: ‘ZopharPack:PONG’.
emulator := C8Emulator new.
emulator loadProgram: program.
emulator asMorph
extent: 800@600;
primaryColor: Color gray;
secondaryColor: Color black;
disabledColor: (Color orange alpha: 0.3);
instructionsPerStep: 10;
openInWindow;
takeKeyboardFocus

Bloc and Brick on github

Hi all,
I am pleased to announce that Bloc and Brick successfully moved to GitHub.
This means that the versions on SmalltalkHub are no longer maintained.
You can find installation procedures on github.

Why?
– a single place for all graphics-related projects (Bloc, Brick and maybe Sparta and Roassal in the future, i hope)
– benefit from git possibilities
– benefit from github tools
– more visibility

Some news in Bloc:

  • End of Athens support
  • Support for MS Windows (libMoz2D binary)
  • Static linear and radial GradientPaints
  • BoxShadow effect based on Sparta filters
  • Improvement of BlAnimation
  • Drag & Drop basis

Not much news in Brick:

  • Now Brick is based on the latest version of Bloc
  • Now Brick includes Styles and Theme (moved from Bloc to Brick)
  • First attempt for ColorPalette api (to be confirmed)
  • Material stuff is moved on a separated package (Brick-Material)
  • No more dependencies to PetitCSS / PetitParser in Styles (full smalltalk api)
  • [Warning] TextInput-related widgets are broken, waiting for SpartaEditor api
  • [Warning] Brick has been updated and moved to Github yesterday so it is possible that there are some issues during installation (not yet well tested)

Thanks for your interest in Bloc & Brick,
Best regards,
Glenn.

NeoCSV at Work :)

Hi,

I know a lot of people are interested in (public) datasets (to use as examples). The website https://numeracy.co contains a (small) number of interesting ones. Here is how to access them using NeoCSV.

(NeoCSVReader on:
 'https://numeracy.co/standard-library/us-population/states.csv' asUrl retrieveContents readStream) upToEnd.

or

ZnClient new
 url: 'https://numeracy.co/standard-library/us-population/states.csv';
 contentReader: [ :entity | (NeoCSVReader on: entity readStream) upToEnd ];
 get.

Of course, they don't use UTF-8 and don't advertise it, so on some datasets you need to do something extra.

(NeoCSVReader on:
  (ZnDefaultCharacterEncoder 
     value: ZnCharacterEncoder latin1
     during: [ 'https://numeracy.co/standard-library/us-population/cities.csv' asUrl retrieveContents ])
     readStream) upToEnd.

(Warning: this last example is quite large, 500K records).

Sven

WKHTML2PDF for Pharo 50/60

Hi,

WKHTML2PDF is now available for Pharo 5/6. You can load it from Catalog in Pharo 5/6. So if you like to convert HTML or URLs to a 
PDF use 

  HTML2PDFConverter 
        convert: 'http://www.pharo.org'
        toFile: 'pharo.pdf'

then check it out. Note that I only had the need to make it work on Windows. If someone
adopts to Linux/Mac tell me and we include the contribution.

Project is on STHub as before:

 http://smalltalkhub.com/#!/~TorstenBergmann/WKHTML2PDF 

Thanks
T.

Scripting Unreal with Pharo

Annnddddd…. I DID IT !!!

I accomplished connecting Pharo with Unreal so I can script it with Pharo. It works from inside the editor and for the game as standalone. True live coding🙂
I am amazed how fast it is, but then I guess it should be expected with shared memory.  You can watch a short demo here
When I first created the loop, nothing happened.
So naturally I expected that my CPPBridge was not working, my loop is basically going from 1 to 150 (z axis), 10 times. After inserting a delay of just 10 milliseconds I could see movement.
So apparently without the delay Pharo , Unreal and CPPBridge are so fast that do 10 times movement of 1 to 150 in under one frame !!!!! So now I will have to slow down thing to make them work as I want !!! LOL!!!! I expected to be fast but nowhere that fast.
Not that I am complaining.
But this is just the first step, now I will slowly and steadily start to wrap Unreal Engine 4.13 API for Pharo.
Its a dream to use Pharo professionally🙂
Dimitris Chloupis

Sven’s Magic Touch

I wanted to get all the lines of http://www.pallier.org/ressources/dicofr/liste.de.mots.francais.frgut.txt

And ZnEasy get: ‘http://www.pallier.org/ressources/dicofr/liste.de.mots.francais.frgut.txt’

did not like to proceed…

Here is Sven trip and tricks at work!

This page returns text that is latin1 (iso-8859-1) encoded, but describes it as ‘text/plain’ without further qualification. Zn then assumes the encoding is utf8 (the most reasonable default today). Mime-types can specify the encoding as follows: ‘text/plain;charset=utf8’ or ‘text/plain;charset=latin1’.

Here is how to override the default in Zn

(ZnDefaultCharacterEncoder
value: ZnCharacterEncoder latin1
during: [
ZnClient new
get: ‘http://www.pallier.org/ressources/dicofr/liste.de.mots.francais.frgut.txt’ ]) lines.

The above will give you an array of 336531 words (it is a bit slow because it is lot of data).

This is a common problem😉