Planet Smalltalk

December 11, 2019

Cincom Smalltalk - Smalltalk Digest: December “Year in Review” Edition

Welcome to the December 2019 “Year in Review” edition of the Cincom Smalltalk™ Digest.  In this last, valuable edition of the year, we will review some of the highlights from […]

The post Smalltalk Digest: December “Year in Review” Edition appeared first on Cincom Smalltalk.

Pharo Weekly - [Ann] Grouper

Hello,

I made a small library that reify grouping (that one does via #groupBy: usually): Grouper https://github.com/juliendelplanque/Grouper

It is designed in the same spirit as SortFunction, but for grouping.

Quick example:

The following code snippet using Grouper:

(10 to: 50) groupUsing: [ :integer | integer asString first ].
"an OrderedDictionary(
  $1->#(10 11 12 13 14 15 16 17 18 19)
  $2->#(20 21 22 23 24 25 26 27 28 29)
  $3->#(30 31 32 33 34 35 36 37 38 39)
  $4->#(40 41 42 43 44 45 46 47 48 49)
  $5->#(50))"

Julien Delplanque

December 10, 2019

Pharo Weekly - [Ann] New booklet on a cool little framework

December 03, 2019

Pierce Ng - Building Pharo VM on Alpine Linux in Docker

I've put up a Dockerfile that builds the Pharo pharo.cog.spur.minheadless VM on Alpine Linux within Docker. This allows one to build said VM without having to first create an Alpine Linux installation such as through VirtualBox.

This is a multi-stage Dockerfile. The Pharo VM is built in an Alpine Linux 'build' container. Then the VM files are copied into a fresh Alpine Linux Docker image. The resulting Pharo VM Docker image is ~14 MB.

The output Docker image contains the Pharo VM only and is not runnable by itself. It is intended to be used as a base to build your own Docker image containing your application-specific Pharo image.

Tested on Ubuntu 18.04 and MacOS Mojave.

Edit: Changes to OpenSmalltalk VM source tree for building on Alpine Linux are in the pierce_alpine branch of my fork.

December 02, 2019

Craig Latta - Naiad progress 2019-12-02: online team services

Naiad keeps livecoders informed of their teammates activity, and remembers all history.

topology established

Naiad is Caffeine‘s live module system. The goal is to support live versioning of classes and methods as they are edited, from connected teams of developers using Smalltalk or JavaScript IDEs from web browsers and native apps. Naiad keeps each developer informed of events meaningful to their teams and work. It’s comparable to a mashup of GitHub and Slack, and will interoperate with them as well.

The current Naiad prototype uses a relay network of NodeJS servers, each with Caffeine running in a Web Worker thread, and each serving a set of Caffeine-based client IDEs, in web browsers and native apps. The workers keep track of class and method versions, system checkpoints, and teams, using the relays to broadcast events to clients. Clients can request various services of the workers, like joining teams and making checkpoints from object memory snapshots.

These two clients are connected to the same relay server. The client on the left created a new team, by sending a message to the relay’s worker. The worker created the team, and told the relay to notify all of its peers (clients and relays). For now, clients respond by inspecting the new team.

I’ve just made the first system checkpoint, and broadcast the first team event (the creation of a team). Eventually, Naiad will support events for several services, including team chatting and screen-sharing, history management, and application deployment. I’m still eager to hear what events and services you think you would want in a livecoding notification system; please let me know! I expect the first public release of this work to be part of the second 2019 solstice release, on 22 December.

December 01, 2019

Pharo Weekly - Tests!

Screenshot 2019-12-01 at 18.02.38.png

64269 tests passing! Quite nice. We are regularly investing on improving our tests.

Some actions are worth mentioning:

  • Executable comments (not counted in the tests above) are disguised assertions that help the users to understand code. Soon we will add them to the automatic build.
  • DrTests plugin architecture will bring super cool analyses to improve your tests and code. S. Demeyer’s group at antwerp is working on test amplification for Pharo and more.
  • UI testing. We are testing Morphic and GTK UIs with the SAME test suites.
  • FFI testing. We are testing FFI with C programs to make sure that FFI is working as it should.

At the end of the day, this is always intriguing to see that we rarely have access to the bug/enhancement requests and tests of proprietary software – may be because it is better not to show their non existence. While with open-source projects like Pharo,  YOU can measure our progress and see it. Now transparency as a cost, we can get bashed that we have too many enhancement requests, that we are moving too fast.

At the end of the day, we get a better and more robust system and we are investing in the future!

Stay tuned. Pharo is growing and feeling better.

 

November 30, 2019

Pierce Ng - Minimizing Docker Pharo - Plugins

In the quest^Wrather leisurely ambulation towards the smallest possible Docker image for Pharo for running headless, batch and server-side applications, one approach is to reduce the size of the Pharo VM, by removing irrelevant built-in and external plugins, also known as modules.

Here's what a pharo.cog.spur.minheadless VM built yesterday produces from STON toStringPretty: Smalltalk vm listBuiltinModules:

'[
    ''SqueakFFIPrims'',
    ''IA32ABI VMMaker.oscog-eem.2480 (i)'',
    ''FilePlugin VMMaker.oscog-eem.2530 (i)'',
    ''FileAttributesPlugin FileAttributesPlugin.oscog-eem.50 (i)'',
    ''LargeIntegers v2.0 VMMaker.oscog-eem.2530 (i)'',
    ''LocalePlugin VMMaker.oscog-eem.2495 (i)'',
    ''MiscPrimitivePlugin VMMaker.oscog-eem.2480 (i)'',
    ''SecurityPlugin VMMaker.oscog-eem.2480 (i)'',
    ''SocketPlugin VMMaker.oscog-eem.2568 (i)'',
    ''B2DPlugin VMMaker.oscog-eem.2536 (i)'',
    ''BitBltPlugin VMMaker.oscog-nice.2587 (i)'',
    ''FloatArrayPlugin VMMaker.oscog-eem.2480 (i)'',
    ''FloatMathPlugin VMMaker.oscog-eem.2480 (i)'',
    ''Matrix2x3Plugin VMMaker.oscog-eem.2480 (i)'',
    ''DropPlugin VMMaker.oscog-eem.2480 (i)'',
    ''ZipPlugin VMMaker.oscog-eem.2480 (i)'',
    ''ADPCMCodecPlugin VMMaker.oscog-eem.2480 (i)'',
    ''AsynchFilePlugin VMMaker.oscog-eem.2493 (i)'',
    ''BMPReadWriterPlugin VMMaker.oscog-eem.2480 (i)'',
    ''DSAPrims CryptographyPlugins-eem.14 (i)'',
    ''FFTPlugin VMMaker.oscog-eem.2480 (i)'',
    ''FileCopyPlugin VMMaker.oscog-eem.2493 (i)'',
    ''JoystickTabletPlugin VMMaker.oscog-eem.2493 (i)'',
    ''MIDIPlugin VMMaker.oscog-eem.2493 (i)'',
    ''SerialPlugin VMMaker.oscog-eem.2493 (i)'',
    ''SoundCodecPrims VMMaker.oscog-eem.2480 (i)'',
    ''SoundGenerationPlugin VMMaker.oscog-eem.2480 (i)'',
    ''StarSqueakPlugin VMMaker.oscog-eem.2480 (i)'',
    ''Mpeg3Plugin VMMaker.oscog-eem.2495 (i)'',
    ''VMProfileLinuxSupportPlugin VMMaker.oscog-eem.2480 (i)'',
    ''UnixOSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-dtl.66 (i)''
]'

And here's the directory listing of the VM as built:

~/src/opensmalltalk-vm/products/ph64mincogspurlinuxht% ls
libAioPlugin.so*             libPharoVMCore.a             libSqueakSSL.so*             libssh2.so@
libCroquetPlugin.so*         libRePlugin.so*              libSurfacePlugin.so*         libssh2.so.1@
libEventsHandlerPlugin.so*   libSDL2-2.0.so.0@            libcrypto.so.1.1*            libssh2.so.1.0.1*
libInternetConfigPlugin.so*  libSDL2-2.0.so.0.7.0*        libgit2.so@                  libssl.so@
libJPEGReadWriter2Plugin.so* libSDL2.so@                  libgit2.so.0.26.8*           libssl.so.1.1*
libJPEGReaderPlugin.so*      libSDL2DisplayPlugin.so*     libgit2.so.26@               pharo*

For server-side applications, a number of the plugins and shared libraries (certainly also libPharoVMCore.a) need not be part of the Docker image.

November 29, 2019

Smalltalk Jobs - Smalltalk Jobs – 11/29/19

Two new jobs at DB (Deutsche Bahn, the German Train Operator) in Frankfurt.  One of them is for a junior position and the second is for a more Senior one.  Both require that your work in Germany in Frankfurt, and, both require excellent German and English.

Do note that you most likely need the ability to work in the EU for these jobs.  There is no mention of helping you get a work permit.

November 28, 2019

Smalltalk Jobs - Smalltalk Jobs – 11/28/19

  • Malta, NYSummer 2020 Engineering -Co-Op/Intern (Job Number: 19004245) at GLOBALFOUNDRIES
    • Required Skills:
      • Graduating Senior or Junior in Electrical Engineering or other related discipline
      • Industry experience not required; 3 months minimum experience in any capacity
      • Language Fluency – English (Written & Verbal)
    • Wanted Skills:
      • Basic understanding of semiconductor devices and circuits
      • Smalltalk
      • At least one year of programming experience in Python or related languages
Good luck with your job hunting,
James T. Savidge

View James T. Savidge's profile on LinkedIn

This blog’s RSS Feed

James Foster - Getting Started with OpenGL from C/C++

In preparation for a class in January, I’m studying Computer Graphics. I’ve spent several hours getting OpenGL working in my environment so I can try out some of the examples. This blog post will describe the steps I’ve taken (that now seem very simple!).

My use case is running Ubuntu Server 18.04.3 as a guest using VMware Fusion 11.5.1 on macOS 10.15.1 as a host.

XQuartz on macOS

Install XQuartz then, from a Terminal, configure it to enable indirect GLX:

defaults write org.macosforge.xquartz.X11 enable_iglx -bool true

Now you can log in to your Ubuntu machine by name or IP:

ssh -Y ubuntu

The remaining commands are in Ubuntu.

Update Ubuntu

sudo apt update
sudo apt upgrade -y
sudo apt dist-upgrade -y
sudo apt autoremove -y

Basic C/C++ Development

Install the basic C/C++ development tools:

sudo apt install -y build-essential

Create a test C program using your favorite Ubuntu editor:

// hello.c
#include <stdio.h>
int main()
{
   printf("Hello, World (from C)!\n");
   return 0;
}

From the shell, compile and run the program:

gcc hello.c; ./a.out

Create a test C++ program:

// hello.cpp
#include<iostream>  
using namespace std; 
int main() 
{ 
     cout<<"Hello World (from C++)!" << endl; 
    return 0; 
} 

From the shell, compile and run the program:

g++ hello.cpp; ./a.out

X11

Install X11 on your Ubuntu machine:

sudo apt install -y xorg xorg-dev

Test the X11 install by running a command in Ubuntu to open a clock on your macOS desktop:

xclock &

OpenGL

Install OpenGL on your Ubuntu machine:

sudo apt install -y mesa-common-dev mesa-utils freeglut3-dev 

Test the OpenGL install by running a command in Ubuntu to open a picture on your macOS desktop:

glxgears &

This may report an error: “Error: couldn’t find RGB GLX visual or fbconfig.” As best I can tell, OpenGL does not like the video driver provided by VMware Fusion. A workaround is to install a driver that it recognizes, and try again:

sudo apt install -y nvidia-340
glxgears &

Calling OpenGL from C/C++

Create glut-starter.c. From the shell, compile and run the program:

gcc glut-starter.c -lGL -lGLU -lglut -lm; ./a.out

Create openGL.cpp

// http://www.codebind.com/linux-tutorials/install-opengl-ubuntu-linux/
#include <GL/glut.h>
 
void displayMe(void)
{
    glClear(GL_COLOR_BUFFER_BIT);
    glBegin(GL_POLYGON);
        glVertex3f(0.5, 0.0, 0.5);
        glVertex3f(0.5, 0.0, 0.0);
        glVertex3f(0.0, 0.5, 0.0);
        glVertex3f(0.0, 0.0, 0.5);
    glEnd();
    glFlush();
}
 
int main(int argc, char** argv)
{
    glutInit(&argc, argv);
    glutInitDisplayMode(GLUT_SINGLE);
    glutInitWindowSize(400, 300);
    glutInitWindowPosition(100, 100);
    glutCreateWindow("Hello world!");
    glutDisplayFunc(displayMe);
    glutMainLoop();
    return 0;
}

From the shell, compile and run the program:

g++ openGL.cpp -lglut -lGLU -lGL; ./a.out

Conclusion

I’ll be giving this as instructions to some students in January. If you find issues or have questions, let me know in the comments.

November 26, 2019

ESUG news - ESUG 2020 Novisad 31.8. – 4.9

We are happy to confirm that ESUG will happen in Novisad/Serbia from 31.8.2020 to 4.9.2020

November 25, 2019

Joachim Tuchel - Smalltalk / Web Camp Lake Constance test run

We just had a great weekend at Tägerwilen (Switzerland, close to Konstanz/Kreuzlingen) for a test run of a Smalltalk / Web Camp. Sabine from Spesenfuchs, Thomas from PORaBo and myself had this idea shortly after ESUG 2019, when it became obvious that a visit to the Smalltalk / Web Camp at Yesplan in Ghent / … Continue reading Smalltalk / Web Camp Lake Constance test run

Joachim Tuchel - VA Smalltalk 9.2 released

Instantiations just released Version 9.2 of VA Smalltalk. It is now available for download for all registered users with a valid support contract and there is also a free evaluation version for anybody interested in trying it. Over the last few releases, it seems the folk over at instantiations decided to make each new version … Continue reading VA Smalltalk 9.2 released

November 24, 2019

Benoit St-Jean - Smalltalk et les nombres

Je suis tombé sur un autre article intéressant sur l’excellent blogue de John D. Cook où il traite des erreurs possibles de précision quand on effectue des calculs avec des Float ou des Double.

Évidemment, dans le problème énoncé, si on a recours à des calculs en point flottants, Smalltalk n’échappe pas à la situation décrite, comme n’importe quel autre langage de programmation!

Cependant, on a tendance à l’oublier, Smalltalk vient à la base avec une riche hiérarchie sous la classe Number d’aussi loin qu’on se souvienne!  Il y a donc moyen de faire en sorte que l’expression décrite converge vers une solution précise et exacte!  Comment?  Avec des fractions!

C’est symptômatique de chaque Smalltalker, nous oublions trop souvent à quel point les nombres en Smalltalk sont traités de façon transparente, sans que nous ayions besoin de librairies spécialisés pour le « large integer arithmetic » ou les fractions par exemple! Nul besoin de savoir si tel ou tel nombre peut être représenté sur 32 ou 64 bits!  En fait, les LargeIntegers ne sont limités que par la mémoire disponible sur votre ordi! Quel autre langage peut se targuer d’être en mesure de faire les calculs suivants sans avoir besoin de librairies spécialisées ou que votre environnement de développement vous explose en pleine figure??

November 22, 2019

ESUG news - ESUG 2019 Videos and Slides Online

The Slides and Videos for ESUG19 are finally online:

Videos were recorded for Room A:

ESUG news - ESUG 2019 Videos and Slides Online

The Slides and Videos for ESUG19 are finally online:

Videos were recorded for Room A:

ESUG news - ESUG 2019 Videos and Slides Online

The Slides and Videos for ESUG19 are finally online:

Videos were recorded for Room A:

ESUG news - ESUG 2019 Videos and Slides Online

The Slides and Videos for ESUG19 are finally online:

Videos were recorded for Room A:

November 20, 2019

David Buck (Simberon) - Sea Turtle Rescue is now Released!

Simberon's new mobile game Sea Turtle Rescue has now been released for iPhone, iPad and Android devices. The game is a puzzle game that challenges you to solve puzzles to hatch sea turtle eggs and guide the babies to the ocean.

You can read details about the game and links to the online stores at the web site http://www.simberon.com/SeaTurtleRescue/.


John P - Pharo Takeover

Well, a small group of far-left authoritarians have taken over the Pharo Project. They've single-handedly instituted a "Code of Conduct" promulgated by an individual that hates the heterosexual world, trying to force other people to accept and condone the the bizarre trans world. There a small faction that ascribes to the far-left world view, and they're trying to force all the others to accept

November 17, 2019

Pierce Ng - PBKDF2-HMAC-SHA1 password hashing for TF-Login

I've implemented PBKDF2-HMAC-SHA1 in TF-Login 'password' branch to replace the existing simple and insecure SHA1-based password hashing scheme.

To load, start with fresh Pharo 7 image:

"First load Seaside."
Metacello new 
    baseline: 'Seaside3'; 
    repository: 'github://SeasideSt/Seaside:v3.3.3/repository'; 
    load. 
    
"Then load TF-Login."
Metacello new 
    baseline: 'TFLogin'; 
    repository: 'github://PierceNg/TF-Login:password/src'; 
    load.

As originally implemented, TF-Login also supports cookie-based auto-login, which works by storing username and the SHA1-hashed password in client cookies. This scheme is certainly not secure by current standards and can't be used together with PBKDF2-HMAC-SHA1 password hashing.

Possible future work on TF-Login password management:

  • OAuth2, to replace the existing insecure cookie-based auto-login

  • 2FA

November 15, 2019

Pierce Ng - [ANN] TF-Login for Seaside 3.3 for Pharo 7

I've ported TF-Login to Seaside 3.3 and Pharo 7.

To load, start with fresh Pharo 7 image:

Metacello new 
    baseline: 'Seaside3'; 
    repository: 'github://SeasideSt/Seaside:v3.3.3/repository'; 
    load. 
    
Metacello new 
    baseline: 'TFLogin'; 
    repository: 'github://PierceNg/TF-Login:pharo7/src'; 
    load.

The baseline doesn't load Seaside, in case you want to load it into an image that already has Seaside.

Start Test Runner and run the TF-Login tests. All 62 tests should pass.

November 14, 2019

Pierce Ng - TF-Login for Seaside

TF-Login is a package that provides basic user authentication, registration, and account management for Seaside. It was originally developed on Pharo 1 by Tony Fleig, and ported to Pharo 2 by sergio101.

I am attempting to make TF-Login work with Seaside 3.3.x on Pharo 7. For now, I've reorganized the packages and fixed TLMultiFileDatabase to pass its tests.

Collaborators are welcome.

November 13, 2019

Cincom Smalltalk - Smalltalk Digest: November Edition

Welcome to the November 2019 edition of the Cincom Smalltalk™ Digest.  In this valuable edition, we will talk about the following: CUSTOMERS and PARTNERS Ways to Be Fiscally Responsible when […]

The post Smalltalk Digest: November Edition appeared first on Cincom Smalltalk.

Pierce Ng - MySQL with Pharo

I needed connectivity to MySQL (really MariaDB). Here's what I found.

On Squeaksource, following projects were registered in 2011:

DBXTalk adapted the above into the DBXTalk MysqlDriver, to work with the DBXTalk API.

Then Garage incorporated above as Garage-Mysql.

To connect to MySQL using Pharo 7, the Garage driver is the best bet.

Metacello new
    baseline: 'Garage';
    repository: 'github://pharo-rdbms/garage';
    load: 'Garage-Mysql'.

Here's a simple test with a MariaDB 10 database:

| drv |
drv := GADriver fromConnectionString: (GAConnectionString fromString: 'mysql://localhost:3306/mysql?user=root&password=toor').
drv connect.
[ (drv execute: 'show databases') inspect ] ensure: [ drv close ]

Assuming no connectivity problem, an Inspector pops up with a GAMysqlResultSet.

November 12, 2019

Cincom Smalltalk - What Was Accomplished at a Recent Tech Meetup in Toronto, Canada?

After productive meetings with some customers, Suzanne Fortman had a great listening session and discussion with those in attendance at the Toronto Smalltalk User Group (TSUG) meetup.

The post What Was Accomplished at a Recent Tech Meetup in Toronto, Canada? appeared first on Cincom Smalltalk.

Cincom Smalltalk - Why Should You Use Social Media for Maximum Exposure to Your Company or Application?

Comments from strangers, tire kickers, curious onlookers and fresh eyes at recent conferences and meetups have changed the thinking of the Cincom Smalltalk Product Team regarding how we can improve […]

The post Why Should You Use Social Media for Maximum Exposure to Your Company or Application? appeared first on Cincom Smalltalk.

November 11, 2019

Cincom Smalltalk - Ways to Be Fiscally Responsible when Spending “Use It or Lose It” Budget for 2019

Julie Windsor of Talentia Software UK recently discussed the budget reform that’s happening around the globe. Over the past several years, budget reform has impacted many companies as business leaders seek to […]

The post Ways to Be Fiscally Responsible when Spending “Use It or Lose It” Budget for 2019 appeared first on Cincom Smalltalk.

November 10, 2019

Smalltalk Jobs - Smalltalk Jobs – 11/9/19

  • Bridgewater, NJSenior Software Engineer through Capgemini
    • Required Skills:
      • 5 to 7 years of extensive experience leading development teams across multiple locations
      • Have strong experience in Smalltalk technology stack
      • Good knowledge and understanding of P&C Insurance
      • Experience in coordinating and managing the day to day activities
    • Additional listings: Capgemini
  • Pune, IndiaAS/400 Developer through Zensar Technologies
    • Required Skills:
      • Software Developer with 4-5 years’ experience
      • Financial/ Banking domain experience
      • Experience in Maintenance and Support projects and Development
      • Visual Age Smalltalk
      • Mid range AS/400Technologies – Cobol/400, RPGLE
      • Good Experience/exposure in – Client interaction for business requirement gathering, System designing, coding, testing
      • Full SDLC exposure
      • Willing to travel South Africa
    • Wanted Skills:
      • Domain knowledge – Banking(Core, deposits, statements/alert)
      • Exposure to agile team work process
      • Production/Batch support exposure/experience
Good luck with your job hunting,
James T. Savidge

View James T. Savidge's profile on LinkedIn

This blog’s RSS Feed

Craig Latta - team livecoding features

What IDE information would you like to share with your teammates as you work?

Caffeine can now:

  • provide an IDE as a DOM element
  • provide an IDE as a Chrome DevTools panel
  • run headlessly in a web browser worker thread, NodeJS server worker thread, or NodeJS main thread.

We have all the components we need to connect teams of livecoders, sharing information from their IDEs as they work. What information would we like to share?

proactive conflict resolution

I’d like to share information that makes code integration easier, by spreading awareness of potential conflicts as soon as possible. Imagine, for example, that you’ve found a bug in a longstanding system method, and decide to start editing it. Before the commit of your change (which may still be days or weeks away), someone else on your team also happens to start editing that method. Wouldn’t it be nice to know that both of you are interested in changing the method?

If both of you are connected to a team network, your IDEs can notify each other when a potential conflict situation like this begins, and the two of you can resolve it through discussion. Such a feature could be vital in a team where responsibility for methods and classes is clearly and completely divided between authors.

The servers in this network can provide history services, too, acting as repositories of all the versions of methods and classes that have been committed by team members. This could aid in unit testing, sharing of works-in-progress, and deployment.

How would you use it?

How would you like to use such a system? How would your needs change when acting as a developer, or as a manager? I’m writing a specification now, and would love to hear your thoughts. Thanks!