[ann] Telegram Bots with Pharo

Hi everyone, I share a tool for creating telegram Bots with Pharo. This library provides an interface for the Telegram Bot API.

To create our telegram bot in Pharo, the first thing we need to do is to create a new object that inherits from Bottlegram. This object must define at least these three methods:

  • slashStart: to be executed when the bot receives /start.
  • slashHelp: to be executed when the bot receives /help.
  • defaultText: to be executed when the bot receives an unknown command.

The tool allows creating bots using two methods:

  • Using polling: the bot check updates for an amount of time.
  • Using webhook: Use this method to create a Teapot server to receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we received an HTTPS POST request to the specified URL

Github link: https://github.com/pablo1n7/bottlegram

If you use Telegram, do you test an echo bot in https://t.me/echo_pharo_bot

Saludos, Pablo.

[Ann] P3 version 1.3 – PostgreSQL client

Hi,

There is a new release of P3, the modern, lean and mean PostgreSQL client for Pharo.

https://github.com/svenvc/P3

Version 1.3 contains the following changes:

– Add object logging, see the P3LogEvent hierarchy
– Added P3ConnectionPool with tests
– Better management of prepared statements
– Add support for Chronology objects Time, Date and DateAndTime to be used directly as binding arguments for formatted/prepared statements, with tests
– Added basic support for array based parameter binding, see P3ValuesArray and #printValuesArrayOn:
– Better documentation and fallback for session/connection timezone and character encoder/decoder
– Reimplementation of P3Error adding unique codes and #isLocal as opposed to PostreSQL server generated messages; signalling now happens with instances created by class side accessors
– Bring back P3Client>>#queryEncoding as an alias for P3Client>>#serverEncoding as compatibility support for PharoDatabaseAccessor
– Add P3DatabaseDriver>>#connectSSL:
– Various cleanups and internal improvements 

https://github.com/svenvc/P3/releases/tag/v1.3

The quality of open source software is determined by it being alive, supported and maintained.

The first way to help is to simply use P3 in your projects and report back about your successes and the issues that you encounter. You can ask questions on the Pharo mailing lists.

I want to thank all contributors and users for their help and feedback: you make a real difference.

Since the end of last year, I have been using P3 in a real commercial production context, processing 10.000s of inserts a day and successfully supporting a web application for consulting the data. 

Enjoy,

Sven


Sven Van Caekenberghe
Proudly supporting Pharo
http://pharo.org
http://association.pharo.org
http://consortium.pharo.org

[ann] Eleven

Hello,

I am using https://github.com/JanBliznicenko/eleven for one of my projects.
It is also a full framework, yet much simplier than Seaside and stateless
and I believe only the HTML building functionality can be used indpendently.

Example:
htmlObject := HtmlBody
with:
(HtmlDiv
class: ‘content’
with:
(HtmlAnchor new
href: ‘https://pharo.org‘;
targetBlank;
with: ‘Pharo website’;
yourself)).
String streamContents: [:stream | htmlObject renderFor: nil on: stream]

The nil I am passing in the last line is there in place of an ELRequest
entity and is not needed for simple HTML tags without custom components. You
might check it out. Be aware that my former colleague created it for our
specific project and I have never used it in any other place, so I just HOPE
it would work like I imagine. It is also not documented or tested at all.

Best regards,
Jan

This week (41/2020) on the Issue Tracker

Not communicating does not mean that we are not working 🙂 In fact we got busy. And we will start to have weekly log of activities.

Parser/Syntax Highlighting

Improvement to make the prior huge improvement on parsing of syntactically wrong
code much more usable:

Several fixes to the parser and syntax feedback #7411
https://github.com/pharo-project/pharo/pull/7411

First class Variables / Compiler cleanup

Lots of work has been done to unify all meta objects describing Variables into one  hierarchy (see Variable and subclasses). This in turn enables many
cleanups and simplification on the level of the name analysis of the Compiler and the API that the debugger uses to read Variables. Nearly finished, but some smaller steps remain:

Variable-scope-addTests #7435
(all Variable objects should know the scope where they are from)
https://github.com/pharo-project/pharo/pull/7435

Name Analysis: Lookup Slots In Class #7403
https://github.com/pharo-project/pharo/pull/7403

reduce-sends-doSemanticAnalysis #7402
https://github.com/pharo-project/pharo/pull/7402

7405-Debug-It-is-broken #7406
(this was a bad side effect of a refactoring needed to be able to move
 the call of #doSemanticAnalysis into the Compiler)
https://github.com/pharo-project/pharo/pull/7406



Fluid Class Definitions

This is ongoing work to have a better class definiton for what is now called
“slot enabeled class defintion” (the one where one can use First Class Variables and where the Layout class is shown explicitly)

7444-Prepare-fluid-class-integration-part-4 #7445
https://github.com/pharo-project/pharo/pull/7445

7437-prepare-fluid-class-integration-part-3 #7438
https://github.com/pharo-project/pharo/pull/7438

7412-preparing-the-integration-of-fluid-class-part-2 #7434
https://github.com/pharo-project/pharo/pull/7434

7431-preparing-fluid-class-Part-1 #7433
https://github.com/pharo-project/pharo/pull/7433

Debugger

Debugger-should-show-Workspace-bindings #7408
A try to simplify how the workspace binding is found when debugging.
Leads to many problems, will be reverted.
https://github.com/pharo-project/pharo/pull/7408

7362-Package-Debugger-Filters-is-not-used-and-can-be-removed #7430
https://github.com/pharo-project/pharo/pull/7430

Added a closeAllDebugger method to trait TDebugger class, that users … #7328
(just a first step, not yet solved)
https://github.com/pharo-project/pharo/pull/7328

Exposing signalContext in Exception #7417
https://github.com/pharo-project/pharo/pull/7417

ReadOnly Literals

The compiler and the VM has support to make literals read-only. As the ability
to change literals without the code reflecting it has lead to ugly bugs in the
past, turning this on looks like a good idea:

SourceFileBufferedReadWriteStreamTest-readOnlyLiteral #7418
https://github.com/pharo-project/pharo/pull/7418

betterName-isSharedLiteral #7432
https://github.com/pharo-project/pharo/pull/7432

Enable-ReadOnly-Literals #7393
https://github.com/pharo-project/pharo/pull/7393

Bug Fixes

Background failures log in CI #7337
https://github.com/pharo-project/pharo/pull/7337

5956-Wrong-format-of-DoubleWordArray #7404
Ongoing work. All code is merged, but now we need to still see that we
can create classes like that with the bootrap
https://github.com/pharo-project/pharo/pull/7404

Fix_for_PluggableSliderMorph #7415
https://github.com/pharo-project/pharo/pull/7415

7414-division-of-number-by-array-fails-with-doesNotUnderstand-isZero #7425
https://github.com/pharo-project/pharo/pull/7425
Cleaning integer division #7436
https://github.com/pharo-project/pharo/pull/7436

Comments

7042-Better-comment-for-CompiledBlock-and-FullBlock
https://github.com/pharo-project/pharo/pull/7447

Cleanups

7367-pragmas-not-needed-textEditorShiftedMenu-fileListContentMenu #7426
https://github.com/pharo-project/pharo/pull/7426

Fixed #7420. Added transformation rules to some non-transforming deprecations 
that were identified as automatable in the Deprewriter paper #7427
https://github.com/pharo-project/pharo/pull/7427

7364-RBSelectorNode-has-unclassified-methods #7424
https://github.com/pharo-project/pharo/pull/7424

7416-Fileout-a-protocol-raises-a-DNU #7441
https://github.com/pharo-project/pharo/pull/7441

7365-DictionaryValueHold-removeKey-calls-a-non-existing-method #7407
https://github.com/pharo-project/pharo/pull/7407

Pharo on a Netbook running TinyCore Linux

This is cool…  

After I booted TinyCore Linux[1] on my 10-year-old netbook[2], I decided to
see if it could run Pharo…

It does!

Details:
[1] http://tinycorelinux.net/
– TinyCore Linux “CorePlus”, 32-bit, version 11.1.
– Booted from a YUMI multiboot thumbdrive.
– Installed ‘curl’, ‘bash’, Firefox (to access ‘pharo.org‘ site for download
info).

[2]
https://www.notebookcheck.net/Review-Acer-Aspire-One-D255-Netbook-N550.40151.0.html
– Acer D255 “AspireONE” netbook (Sept, 2010).
– 2 GB RAM (single DIMM).
– 250 GB SSD (not being used; TinyCore running 100% in RAM).

The Proof:
<http://forum.world.st/file/t372161/Pharo8-32_TinyCore_AcerD255_2020-0907.jpg> 

Ted

Crypto-Nacl

Hi all,

I wanted to let you know that I ported the Crypto-Nacl library from SmalltalkHub to GitHub here: https://github.com/objectguild/Crypto-Nacl

The original author is Tony Garnock-Jones, with contributions from Hernán Morales Durand. See the README for more details.

Libsodium has evolved a lot over time, which means that there is plenty of additional functionality that can be unlocked through this library. I don’t have a need for it at the moment, but that might change in the near future. My interest is in using the cryptographic features to enhance security of business applications.

Oh, and thanks to the Buenos Aires Smalltalk team (https://github.com/ba-st/) for inspiration on using GitHub Actions with smalltalkCI 🙂

Cheers,

Jonathan van Alteren

Founding Member | Object Guild B.V.
Sustainable Software for Purpose-Driven Organizations

[ann] Indie Web

Hi all,

Due to the confinement in the pandemic, our forms of telepresence become
more important and many suddenly got even more immersed into an
Oligopoly cyberspace (Zoom, Google, Facebook, Twitter, Apple, Amazon,
Microsoft, etc) with opaque algorithms that under extractive logic
commodify our privacy and communications, try to condition our attention
and habits, as well as to shape our current and future behavior. But
this is not the only way to inhabit cyberspace.

From the Grafoscopio community[1], we would like to invite you to a
series of workshops that we are doing to make visible other ways of
populating and building the web, aligned with the movements of
IndieWeb[1a], from what we have called “pocket infrastructures”. You can
find more information about these topics in [2] and in particular about
the workshops in [3] (in Spanish).

[1] https://mutabit.com/grafoscopio/en.html
[1a] https://indieweb.org/
[2] https://mutabit.com/repos.fossil/indieweb/
[3]
https://mutabit.com/repos.fossil/indieweb/doc/trunk/docs/es/index.html#talleres

The second workshop will be tomorrow, Saturday, Aug. 29 from 3:15 PM to
7:15PM CO (GMT – 5) — I will try to share the other workshops earlier,
but the site in [2] will be the consolidated memory of them, for those
who want to join us asynchronously.

We will see how IndieWeb sites help us to untangle and reweave that
other web and how this help us to reconnect in this stranger times.

Rethinking the infrastructure is also to rethink the ways in which it
enables and makes visible (or not) certain ways of being and acting.
Infrastructures are embodied discourses. So thank you in advance for
joining us in rethinking this in practice.

Of course, Pharo is behind scenes, as usual, powering this experience.
But with these IndieWeb workshops I think we have found a sweet spot
that puts coding in front with a practical introduction and motivation
beyond the kind of boring “Hello World”. Following a “local first”
approach, documentation will be in Spanish, but source code[5] and
interactive documentation will be in English to bridge our worlds :-),

[4] https://mutabit.com/offray/blog/en/entry/dumb-hello-world
[5] https://mutabit.com/repos.fossil/brea/

See you on cyberspace,

Offray

Static SmalltalkHub

Hi all,
Since May, SmalltalkHub is in read-only mode, allowing people to get back their data and move it to another forge if needed.We had several unexpected downtimes with the deprecated version of Smalltalkub (different software stack due to server migration).

To enhance the user experience, we put the static version of Smalltalkhub «  SmalltalkHub archive » on-line as the official http://smalltalkhub.com service. It was already announced that it will be done in November but we decided to do it earlier because it improves the current state:

– faster and reliable downloads from smalltalkhub.com (mcz files are no longer stored in a Mongo DB but served as static files)

– Smalltalkhub archive still allows to list projects, search for a project, see packages, contributors, commits

– the deprecated version of smalltalkhub is still on-line until November at http://deprecated.smalltalkhub.com/.


So you have the best of the 2 versions.


Regards,The Pharo consortium team.

Pharo Master Class for Inria Academy @Inria Chile

Tuesday I will give a master class to 90 attendees. This master class is organized by Inria Chile and the Inria Academy.

I will do many interactive sessions but the slides to back-up and explain some sessions are available at http://rmod-pharo-mooc.lille.inria.fr/MasterClass/

S.

An object view on global usage: the case of Transcript

Hi guys
I wrote this https://thepharo.dev/2020/08/11/transcript-the-misunderstood-global/because I thought that I had to :).


See Chapter 8 for a longer version is available at https://github.com/SquareBracketAssociates/Booklet-PharoWithStyle/releases/download/continuous/WithStyleBook-wip.pdf

Feedback and PRs are welcome.

S (full of positive energy)