Re: [Pharo-users] [ANN] P3 version 1.2

2019-02-13 Thread Francisco Ortiz Peñaloza
This is great news. Thanks!

On Tue, Feb 12, 2019 at 5:44 PM Tudor Girba  wrote:

> Thanks a lot for doing this!
>
> It is of great help to know that we can reliably work with Postgres.
>
> Cheers,
> Doru
>
>
> > On Feb 12, 2019, at 3:22 PM, Sven Van Caekenberghe  wrote:
> >
> > Hi,
> >
> > There is a new release of P3, the modern, lean and mean PostgreSQL
> client for Pharo.
> >
> > https://github.com/svenvc/P3
> >
> > Version 1.2 contains the following changes:
> >
> > - P3PreparedStatement is now joined by a polymorphic
> P3FormattedStatement working client side on text strings
> > - P3PreparedStatement & P3FormattedStatement now share the same double
> dispatch mechanism to process argument binding
> > - Added convenience methods #listDatabases #listSchemas &
> #listTablesInSchema: to P3Client
> > - Added convenience methods #firstColumnData & #firstFieldOfFirstRecord
> to P3Result
> > - Added dynamic ENUM support via #loadEnums in P3Client
> > - Add support for the 7 geometric types POINT, CIRCLE, LINE, LSEG,
> POLYGON & PATH with corresponding objects P3Point, P3Circle, P3Line,
> P3LineSegment, P3Polygon & P3Path
> > - Add support for the INTERVAL type with P3Interval object
> > - Added P3Client>>#serverVersion accessor
> > - Add support for BIT & VARBIT types with P3FixedBitString & P3BitString
> objects
> > - Add TIMETZ support
> > - Organised P3 package with tags
> > - More & better documentation & unit tests
> >
> > https://github.com/svenvc/P3/releases/tag/v1.2
> >
> > 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.
> >
> > Enjoy,
> >
> > Sven
> >
> > --
> > Sven Van Caekenberghe
> > Proudly supporting Pharo
> > http://pharo.org
> > http://association.pharo.org
> > http://consortium.pharo.org
> >
> >
> >
> >
> >
>
> --
> www.feenk.com
>
> "What is more important: To be happy, or to make happy?"
>
>
>


Re: [Pharo-users] Multiple NeoJSON mappings for the same domain object

2019-02-13 Thread Francisco Ortiz Peñaloza
Hi,

sadly there is no documentation about Stargate yet, we did the first
release just 20 days ago.

Regarding HATEOAS, is an optional feature and we're testing it usefulness
right now.

Stargate is built on top of Zinc and Teapot and it has the following
features:
- Content negotiation allows serving different representations of a
 resource. E.g. "application/json;version=1.0.0" and
"application/json;version=1.0.1" serve different representations of a
resource. We think this will allow us to grow in easily our APIs.
- Optional resource pagination support.
- Optional HATEOAS support.
- ETag generation.

PS: We already took note of  https://github.com/zweidenker/JSONSchema and
https://github.com/zweidenker/OpenAPI. Both projects look great.

On Wed, Feb 13, 2019 at 12:58 PM Norbert Hartl  wrote:

>
>
> > Am 13.02.2019 um 13:53 schrieb Esteban Maringolo :
> >
> > Not in a hurry at all, I'm defining this part, so I can explore
> > different alternatives.
> >
> > I'll explore the OpenAPI approach with JSONSchema as well.
> >
> >
> > Regards,
> >
> > ps: What I liked about Stargate is that it manages other aspects of an
> > API such as CORS, HATEOAS [1] and resource versioning, but
> > JSON-HyperSchema [2] seems to provide a similar approach to HATEOAS, I
> > don't know if there something in OpenAPI to have multiple
> > representation versions of the same resource (so you preserve the
> > route, but make the API back AND forward compatible).
> >
> Is there any documentation about stargate? Caring about CORS is surely
> useful. But I never got why HATEOAS is useful. It adds a lot of complexity
> with little use.
>
> Norbert
> > [1] https://en.wikipedia.org/wiki/HATEOAS
> > [2]
> https://www.ietf.org/archive/id/draft-handrews-json-schema-hyperschema-01.txt
> >
> > Esteban A. Maringolo
> >
> >> El mié., 13 feb. 2019 a las 4:45, Norbert Hartl ()
> escribió:
> >>
> >> If you are not in a hurry you can use JSON schema. That is also an
> external mapper which can validate. And the spec is serializable. You might
> miss some functionality but I could try to add that if you don‘t do. I
> would be happy to have more users of the library.
> >>
> >> If you use it for REST you could also use OpenAPI which I did. It uses
> the JSON schema stuff for doing it.
> >>
> >> Norbert
> >>
> >>> Am 13.02.2019 um 02:58 schrieb Esteban Maringolo  >:
> >>>
> >>> Meanwhile I found another approach to solve this in the context of a
> >>> JSON/REST API.
> >>>
> >>> E.g. see #addRuleToEncode:to:using: in.
> >>>
> https://github.com/ba-st/Stargate/blob/release-candidate/source/Stargate-Examples/PetsRESTfulControllerSpecification.class.st
> >>>
> >>> Has a separate mapper for encoding and decoding, depending on the
> endpoint:
> >>>
> >>> Regards,
> >>>
> >>> Esteban A. Maringolo
> >>>
> >>> El mar., 12 feb. 2019 a las 19:34, Esteban Maringolo
> >>> () escribió:
> 
>  Hi all, Sven, :)
> 
>  I'm working on a domain model that will have different JSON
>  representations for the same domain objects, so depending on the
>  context it will return one representation or another.
> 
>  In the past to solve the multiple representations, what I did was to
>  build "helper" methods that added the mappings to the mapper.
> 
>  So the process was like:
>  1. instantiate the mapper
>  2. call a #neoJsonSimple: mapper
>  3. configure the mapper by calling other mapping defining methods
>  4. convert the object to a JSON string.
> 
>  If I wanted an "extended" representation, in the step 2 I would call
>  #neoJsonExtended: instead.
> 
>  But I find this "too manual" to scale.
> 
>  So... is there a better, ¿canonical?, way to achieve this?
> 
> 
>  Thanks!
> 
> 
>  ps: By now it will be only object -> JSON (so NeoJSONWriter), but in
>  the future I might need to instantiate objects back from JSON, so the
>  mappings should be for both mappers.
> 
>  Esteban A. Maringolo
> >>>
> >>
> >>
> >
>
>
>


Re: [Pharo-users] [ANN] Teapot was moved to GitHub

2018-11-29 Thread Francisco Ortiz Peñaloza
Hi,

It is great to have Teapot finally migrated to github.

For those who liked the project structure and docs see
https://github.com/ba-st/GitHub-setup.

Cheers,


On Wed, 28 Nov 2018 at 18:48 Attila Magyar  wrote:

> Esteban A. Maringolo wrote
> > Excellent material.
> > I also liked that you not only provided instructions for installation,
> > but also to set Teapot as a dependency.
> >
> > Please add the `pharo` tag to the repository, so it gets listed in the
> > topics section [1] and also helps bumping Pharo topic to the home of
> > the Topics page.
> >
> > [1] https://github.com/topics/pharo?o=desc=updated
> >
> > Esteban A. Maringolo
>
> Yeah, many of these were added by a contributor @fortizpenaloza, so big
> thanks to him.
>
> Sure, I added the tags.
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
> --
Sent from the past


Re: [Pharo-users] [ANN] JSON schema implementation

2018-11-22 Thread Francisco Ortiz Peñaloza
This is great.

Thanks!

On Thu, 22 Nov 2018 at 18:10 Sven Van Caekenberghe  wrote:

> Nice. Another piece of the puzzle. Thank you.
>
> > On 22 Nov 2018, at 17:56, Norbert Hartl  wrote:
> >
> > JSONSchema
> > ===
> >
> > This is an implementation of JSON Schema for the pharo language. It is
> used to define the structure and values of a JSON string and to validate
> it. The schema itself can be externalized for being consumed by a third
> party.
> >
> > I like to announce the availability of a JSON schema implementation for
> pharo. As part of my implementation of OpenAPI (which is to be released a
> bit later) I factored out the JSON schema part into its own repository
> because I think it is useful. I release it even it is not really finished.
> Code is mostly undocumented and a lot of features are missing from the full
> spec. I will improve it slowly and add features as I need them or they
> being requested
> >
> > Hope you like it!
> >
> > Norbert
> >
> > 
> >
> > The documentation so far (from https://github.com/zweidenker/JSONSchema)
> >
> > It can be loaded by downloading it in pharo via
> >
> >   Metacello new
> > repository: 'github://zweidenker/JSONSchema';
> > baseline: #JSONSchema;
> > load
> >
> > Defining a schema
> > -
> >
> > These are the expression to create a schema model inside pharo.
> >
> > schema := {
> >   #name -> JSONSchema string.
> >   #dateAndTime -> (JSONSchema stringWithFormat: 'date-time').
> >   #numberOfPets -> JSONSchema number } asJSONSchema.
> >
> >
> > defines as schema that can parse the following JSON:
> >
> > jsonString := '{
> >   "name" : "John Doe",
> >   "dateAndTime" : "1970-01-01T14:00:00",
> >   "numberOfPets" : 3
> > }'.
> >
> > Reading/Writing a value using a schema
> > --
> >
> > To parse the value from JSON we only need to invoke:
> >
> > value := schema read: jsonString
> >
> > The object in value will have name as a string, dateAndTime as a
> DateAndTime object and numberOfPets as a SmallInteger object.
> >
> > The schema can also be used to write out the value as JSON. This is
> especially useful if we want to ensure that only valid JSON is written. For
> this invoke
> >
> > jsonString := schema write: value.
> >
> > Serialize/Materialize a schema
> > 
> >
> > Addtionally to reading and writing objects a schema can be serialized to
> string.
> >
> > schemaString := NeoJSONWriter toStringPretty: schema.
> >
> > gives
> >
> > {
> >   "type" : "object",
> >   "properties" : {
> >   "name" : {
> >   "type" : "string"
> >   },
> >   "numberOfPets" : {
> >   "type" : "number"
> >   },
> >   "dateAndTime" : {
> >   "type" : "string",
> >   "format" : "date-time"
> >   }
> >   }
> > }
> >
> >
> > If we would get a schema as string we can instantiate by invoking
> >
> > schema := JSONSchema fromString: schemaString.
> >
> > Nested schemas
> > ---
> >
> > Schemas can be nested in any depth. And it can be specified by using the
> literal Array syntax.
> >
> > schema := {
> >   #name -> JSONSchema string.
> >   #address -> {
> > #street -> JSONSchema string.
> > #number -> JSONSchema number
> >   } } asJSONSchema
> >
> > Constraints
> > ---
> >
> > JSON Schema has a defined set of constraints that can be specified. E.g.
> for a number the inerval of the value can be specified by
> >
> > numberSchema := JSONSchema number.
> > numberSchema interval
> >   minimum: 1;
> >   exclusiveMaximum: 100
> >
> > constraining the number value to be greater or equal to 1 and smaller
> than 100.
> >
>
>
> --
Sent from the past


Re: [Pharo-users] Making TDD in pharo work properly (aka - walkback on a missing class is nasty)

2018-08-10 Thread Francisco Ortiz Peñaloza
Marcus,

I love this idea, not showing the menu at all would be more aligned to live
coding. As you said in a later e-mail it must be fixed at runtime, while
running the tests.

Thanks!


On Thu, Aug 9, 2018 at 5:07 AM Marcus Denker  wrote:

> >
> >
> >> 2) when coding - if you want reference a missing class, why don’t we
> let you? TonelReader seems to do it, why can’t the editor? (This probably
> applies to variables as well - show them broken, let me fix it when I
> choose. The iVar case is a little rarer - although I hate the way we prompt
> fix, prompt fix instead of doing it in one go - it’s very old fashioned)
> >>
> >
>
>
> An alternative could be to not show the menu at all. Instead just compile
> (I like the ideas that “everything can be compiled and run”).
>
>  Just compile the Undeclared and instead of breaking the flow, we should
> add a menu to the editor to do the “define Class” “Define Trait”…
> (with the gutter icons, we can provide a menu easily).
>
> I will make a small demo for that, too.
>
> Marcus
>


Re: [Pharo-users] PolyMath move to github !

2018-06-29 Thread Francisco Ortiz Peñaloza
Thanks!

On Thu, 28 Jun 2018 at 16:01 Serge Stinckwich 
wrote:

> Thank to the terrific work of Cyril, all the PolyMath code is now
> available on github: https://github.com/PolyMathOrg/PolyMath
>
> With a lot of magic tricks, Cyril was able to preserve part of the history
> of the project:
> https://github.com/PolyMathOrg/PolyMath/graphs/contributors
>
> This is nice to all the commits that we have done sine more than 3 years,
> available as git commits now !
>
> ​Thank you again Cyril !
>
> From now, we will use only github for the commits. You will have to use
> Pharo 6.1 or Pharo 7.0 to use Iceberg.​ I will prepare a guide for
> contributing to PolyMath soon.
> ​​
> --
> Serge Stinckwich
> UMI UMMISCO 209 (SU/IRD/UY1)
> "Programs must be written for people to read, and only incidentally for
> machines to execute."http://www.doesnotunderstand.org/
>
-- 
Sent from the past


Re: [Pharo-users] [ANN] Iceberg v1.0.0

2018-05-30 Thread Francisco Ortiz Peñaloza
Great work, thanks!

On Tue, 29 May 2018 at 06:31 Guillermo Polito 
wrote:

> Hi all,
>
> Time for a new Iceberg update, that will be available in the next Pharo
> build. This time, there are lots of cleanups and enhancements. On the big
> highlights:
>
> - Tonel migration plugin is available in the "Other menu item"
> - Tests are green on 64 bits! (meaning iceberg can be safely used in 64
> bits).
>
> Thanks to everybody that participated in reviewing, opening/closing issues
> or even fixing a typo!
>
> # Documentation
>
> Just as a reminder, here you have a link to iceberg's wiki, convering some
> info like terminology, how to help us, and so on...
>
> https://github.com/pharo-vcs/iceberg/wiki
>
> # And some videos ;)
>
> - Branching and merging https://www.youtube.com/watch?v=DBzkjwABPEI
> - Loading a Baseline https://youtu.be/brUHEOr-p_E
> - Contributing to Iceberg https://youtu.be/yGr5HvVWM0M
>
> # Changes Log
>
> https://github.com/pharo-vcs/iceberg/releases/tag/v1.0.0
>
> Enjoy, Guille
>
> PS, detailed changes log below:
>
> # Cleanups
>
> #819 Fix tooltip typo in settings
> #800 Iceberg should be removed from the catalogue
> #801 Remove not referenced packages
> #803 Correct some lints in tests
> #806 Bad repair options when local repository is missing
> #725 Remove and clean old UI
> #794 Some classes should use category "utilities" instead of "utility"
> #791 Begin to remove old UI
> #734 Begin to remove old UI
> #576 Add link to github/gitlab ssh instructions
>
> # Enhancements
>
> #776 Upgrade to Commander 0.6.2  dependencies
> #765 Add command to copy SHA from history window
> #793 Add the commit message to history window
> #785 Metacello conflicts are not handled Metacello Integration
>
> # Bug fixes
>
> #771 IceTipRemoveFromRepositoryPackageCommand >> execute is not implemented
> #748 Code subdirectory in empty repository
> #767 Error while pulling with renamed packages
> #814 Moving extension from a package removes extended class
> #807 When we do not have the right to push on a report we get an Error
> instead of the pop up!
> #768 Inverse merge preview shows wrong diff
> #784 Pulling from a non existing remote branch fails#810 #removePackage:
> should recursively delete files
>
> # Documentation
>
> #702 Create screencast - How to contribute to iceberg
> #774 Copy Wiki contribution page to pharo-project/pharo wiki
>
> # Infrastructure
>
> #761 Make tests run in 64 bits Pharo 7
>
> --
Sent from the past


Re: [Pharo-users] Using secure websockets server side with Zinc

2018-05-06 Thread Francisco Ortiz Peñaloza
Sorry for the OT but I interested in how you're using WebSockets and
Seaside.

Can you share how are you mix them together?



On Wed, May 2, 2018 at 11:40 AM Cyril Ferlicot D. 
wrote:

> On 02/05/2018 16:29, Sven Van Caekenberghe wrote:
> > Hi Cyril,
> >
>
> Thank you for the infos and the fast reply :)
>
> > You can run a ZnSecureServer with a specific certificate. See the class
> comment. But, this is a bit experimental, you need a very specific
> certificate and I have only seen it work on Linux.
> >
>
> Good to know!
>
> > If you front you Seaside app with Nginx, I assume you are doing HTTPS ->
> HTTP in Nginx. I would suggest you try doing WWS -> WS as well. This does
> mean that connections are kept open of course (implicit in WebSockets). I
> have not yet done this myself, but it should work theoretically.
> >
>
> This is what I do now and it works fine. I just wanted to know if there
> was an alternative to write it in the documentation of the project
> (since it will be open source).
>
> > The thing is, you will find 100x more info on (correct) TLS/SSL setup on
> Nginx, and app proxying is totally accepted today.
> >
>
> Ok, so I'll probably just give an example with nginx in the documentation
> :)
>
> > Please let us know how it goes ;-)
> >
> > Sven
> >
> >
>
>
> --
> Cyril Ferlicot
> https://ferlicot.fr
>
>


Re: [Pharo-users] [ANN] OpenSSL-Pharo works on Windows

2018-01-15 Thread Francisco Ortiz Peñaloza
Thanks!

Francisco

On Mon, Jan 15, 2018 at 8:20 AM, Tudor Girba  wrote:

> Thanks a lot!
>
> Doru
>
>
> > On Dec 20, 2017, at 8:55 AM, Pierce Ng  wrote:
> >
> > Hi all,
> >
> > OpenSSL-Pharo now works on Windows. Tested on Windows 10 with a fresh
> 32-bit
> > Pharo 6.1 zip package downloaded from pharo.org. On Windows this
> library uses
> > libeay.dll which is bundled with the Pharo VM.
> >
> >  Metacello new
> >baseline: 'OpenSSL';
> >smalltalkhubUser: 'PierceNg' project: 'OpenSSL-Pharo';
> >load.
> >
> > Pierce
> >
> >
>
> --
> www.tudorgirba.com
> www.feenk.com
>
> "No matter how many recipes we know, we still value a chef."
>
>
>
>
>
>
>
>
>