Monthly Archives: December 2018

[ANN] P3 version 1.1

Hi,

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

https://github.com/svenvc/P3

Version 1.1 contains the following changes:

- added support for Postgres Extended Query protocol (P3PreparedStatement) (thx Jan @jvdsandt)
- added support for reading array type values (currently INTEGER[] FLOAT[] BOOLEAN[] TEXT[] VARCHAR[])
- added P3-Tests package and moved all tests there
- more comments
- more unit tests

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


Especially Jan's contribution adds a lot of functionality: the ability to work with prepared statements.

Here is an example doing a batch insert of 100 records (which is more efficient).

| client statement |

client := P3Client url: 'psql://sven@localhost'.

client execute: 'DROP TABLE IF EXISTS table1'.
client execute: 'CREATE TABLE table1 (id SERIAL PRIMARY KEY, created_at TIMESTAMP DEFAULT NOW(), name TEXT)'.

statement := client prepare: 'INSERT INTO table1 (name) VALUES ($1)'.
statement executeBatch: ((1 to: 100) collect: [ :index | Array with: ('Text #', index printString) ]).

client query: 'SELECT * FROM table1'.
client execute: 'DROP TABLE table1'.

statement close.
client close.


Season's Greetings to you all.

Sven
Advertisements

[Ann] Pharo with Style

Hello,

To finish well this year, I’m happy to announce the release of a new book: Pharo with Style.

This little book focuses on key aspects of code: how it communicates with you and your collaborators. I hope it will help you to write great communicating applications.

https://github.com/SquareBracketAssociates/Booklet-PharoWithStyle

PDF on Bintray

S. Ducasse

PostgresV3 with parameter binding

Hi all,

I've modified PostgresV3 to do parameter binding, i.e., parsing SQL and
binding/executing with data are performed in separate protocol steps.
I've add a simple client API with some examples demonstrating usage. The
examples require a PostgreSQL server loaded with the Sakila database.
Instructions on bringing the database up and running the examples are in
my blog post:

  https://www.samadhiweb.com/blog/2018.12.25.postgresv3.html

Season's greetings!

Pierce

[ANN] Pharo Lambda Ultimate

Hi,

Last month Amazon extended their serverless runtime platform AWS Lambda with support for custom runtimes. I created a Pharo Lambda Runtime so now we can implement Lambda functions in Smalltalk and easily deploy them on the Lambda platform.

Lamba has quite a large “free-tier”, more than enough to do some experiments and to host small applications for free.

See the GitHub project for more details https://github.com/jvdsandt/pharo-aws-toolbox

Cheers, Jan.

[Ann] P8 issue tracker is now github

Hi, 

As part of our constant try to enhance process, we are moving the issue tracker to GitHub.
You can now declare issues here: 

https://github.com/pharo-project/pharo/issues <https://github.com/pharo-project/pharo/issues>

FAQ: 

Q: Why we do this?
A: 
- Because reuniting all development process in just one point will enhance traceability
- … and communication (there are a lot of conversations that now happens in different places (list, issue, PR). With this move we put issue and PR discussion in same place.
- … and people historically has complained that “they need to log to fogbugz to just see the issues” 
- … and this allows us to decommission one server we have now just to get the issues names when creating branches (and before slides).

Q: Does that means fogbugz is bad?
A: Not at all! It is a great tool and we are very grateful of it. Is just that we want to reunite our communication into a single point.

Q: What will happen with issues reported in FogBugz?
A: Pharo 7.0 issues will be taken as before. Pharo 8.0 issues need to be re-opened in GitHub. There are less than 25 right now and we ask people reporting it to move them again (maybe we would do it, but better is owners do).

Q: How can we “branch from issue” now if we do not have FogBugz?
A: We already added a tool “branch from issue” that uses GitHub issue tracker. This will be the same as before. 
And for the same price, we add that option to other projects: All GitHub projects now can benefit from “branch from issue” functionality.

Cheers!
Esteban

[Ann] Pharo 8.0 alpha started

Hello all,

We are preparing to release Pharo 7.0 (which will be in January, as soon as we finish some last details). And in the meantime impatient people has asked (and obtained) the aperture of Pharo 8.0 development! 🙂 So you now can start making Pull Requests against Pharo8.0 branch 🙂

Esteban

PetitParser v2.1.0

Hello,

This email to announce that a new minor release of PetitParser (1) has been published on GitHub (v2.1.0).

Here is the change log:

Summary
-----------
- Each package has its tests separated in a separated package.
- Cleaned baseline, made it more modular.
- Created more groups to let people load the part of the project they want.
- Some cleaning in `PetitParser` package.
- Integrated PetitPreprocessor and PetitParserExtensions in the project as separated groups

Changelog
-----------
#31 Extract PPTextHighlighter into a separated package.
#21 Add contribution guidelines
#13 Update README with new groups
#9 Fix CI configuration
#19 A TODO comment in PPMemoizedParser>>#parseOn: might need to be fixed cleaning
#11 Inconsistent method classification
#15 Split tests in their own packages cleaning
#22 PetitPreprocessor is missing some extensions
#3  Use `>>>` notation for examples inside method
#8 PPStream>>#column: has commented code that should be removed
#7  PPCharSetPredicate and PPContextMemento need to be commented
#1  Replace 'Oops' error message with a meaningful message
#4 PPContext>>#on:stream: should be removed
#2 Integrate PetitParserExtensions package from Smalltalkhub
#5 Integrate PetitPreprocessor package from Smalltalkhub

Thanks to Cyril Ferlicot for his help.

Cheers,

Julien

GeoSphere

Hi All,

If anyone is interested, I've created the beginnings of a library for
handling coordinates at: https://github.com/akgrant43/GeoSphere

It only:

- Parses string coordinates
- Calculates the distance between coordinates
- Opens a web browser in OpenStreetMap at the receiver's coordinates

Examples of string formats that can be parsed:

- 144.61025 @ -38.28697
- 38° 17′ 13.09″ S, 144° 36′ 36.9″ E
- 38 deg 17' 13.09" S, 144 deg 36' 36.9" E
- https://www.openstreetmap.org/#map=18/-38.28697/144.61025

The distance calculation uses haversine (assumes the earth is a
sphere), which is good enough for my needs at the moment.

Thanks again to Sven, Benoit, Pierce and Richard for their input.

Cheers,
Alistair

[ann] PetitParser on github

Hello,

I just finished the migration of PetitParser (1) on Github: https://github.com/moosetechnology/PetitParser <https://github.com/moosetechnology/PetitParser> .

I created a release v1.9.2 which mirrors latest release of Smalltalkhub.

Cheers,

Julien