Re: [Pharo-users] About "it's not pharo but smalltalk"

2020-02-05 Thread Steve Davies
On Wed, 5 Feb 2020 at 19:08, Cédrick Béler  wrote:

> https://lists.pharo.org/mailman/listinfo/pharo-users_lists.pharo.org
>
>
Thanks.

My problem is I'm a newbie.  I thought Pharo was a Smalltalk,  containing
code going back to ST80.  I don't know where Pharo stops and Smalltalk
starts, so its not easy for me to tell if my question is a Pharo question
of a Smalltalk one.

Where are the better places for a Smalltalk (Pharo?) newbie to ask
questions and follow along to deepen my understanding?

Thanks,
Steve


Re: [Pharo-users] About "it's not pharo but smalltalk"

2020-02-05 Thread Steve Davies
Hi,

Can you point me to how to unsubscribe. Obviously not the list for me.

Thanks,
Steve


On Wed, 05 Feb 2020, 18:04 Esteban Lorenzano,  wrote:

> We are so over this discussion.
> You want to take the Smalltalk heritage as a definition, that’s ok.
> We don’t, and that’s ok too.
> Is about what we want to do.
> For any other argument, please take into account this thought  from Alan
> Kay: https://pbs.twimg.com/media/EMJoLicXsAA7dej?format=jpg=small
>
> The real point is: This is a list for Pharo users, about Pharo usage.
> This is not comp.lang.smalltalk.
> This is not /r/smalltalk
>
> So, while off-topic is allowed at a certain point (and while talking about
> other dialects sometimes is not off-topic), please take that into account
> when you smalltalk about smalltalk.
>
> Cheers,
> Esteban
>
>
> > On 5 Feb 2020, at 16:36, TedVanGaalen  wrote:
> >
> > Pharo IS Smalltalk, whether you like it or not.
> > my 2 cents:
> >
> > This thread is incredibly ridiculous IMHO.
> > Is this becoming something like a religious argument,
> > like church schisms in medieval times?
> >
> > Pharo IS Smalltalk and that is good:
> > That means everyone that is familiar with
> > Smalltalk can use Pharo without any serious difficulties.
> >
> > For example, for learning, one can still use nearly everything
> > from an "old" book like "Smalltalk By Example" by Alex Sharp
> > from 1997 without any modifications whatsoever.
> > It all works.
> >
> > I've ported .st files between different Smalltalk systems
> > and it nearly always works without any modifications!
> >
> > (i don't use traits btw, because this is not Smalltalk
> > as I know it and creates nasty inter-object dependencies,
> > kind of "goto to attempt to multiple inheritance", but that's me :o)
> >
> > Apart from some minor deviations, Pharo conforms to
> > nearly all Smalltalk rules, object hierarchy and syntax.
> >
> > The fundamental system classes throughout all Smalltalk implementations
> > are virtually the same everywhere. Thank the gods for that.
> > COMPATIBILITY. <- read this again if you like.
> >
> >
> > Pharo excels in that the Pharo people did a lot of work in making
> > the Pharo environment productive and a real pleasure to work with!
> > but under the hood -even with the inclusion of new additions- it luckily
> > still is Smalltalk.
> > How can it be not: even the newer Pharo additions are in fact.. classes
> > written in Smalltalk?
> >
> > Making too much distinctions and differences between various
> implementations
> > and dialects of Smalltalk is not a good idea I think. You all want to
> > promote Smalltalk? Then Stick Together As Smalltalkers no matter
> > what version or dialect one is using!
> > Does this sound alien to you, maybe?
> >
> > To, me personally, it doesn't make much difference because luckily most
> > Smalltalk
> > implementations are mostly quite similar, allowing me to switch if needed
> > between (in arbitrary order , sigh) Squeak, Pharo, VisualWorks etc.
> > without too much effort.
> >
> > In making too much distinctions, you are in fact dividing
> > the Smalltalk community, which is bad in Smalltalk's fragile world.
> > Smalltalk, indeed, OOP already has too much opposition
> > of those sticking to other programming techniques etc.
> >
> > Kind Regards
> > TedvG
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > --
> > Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
> >
>
>
>


Re: [Pharo-users] I feel like an overwhelmed maintenance programmer - how to get some toeholds?

2019-12-18 Thread Steve Davies
> > The stuff I need to look into for my project is mixed in with 1000s of
classes that I (hopefully) can ignore for now - but there seems to be no
way to hide away all the irrelevant stuff.


> Is it classes or methods ?


Well "Smalttalk allClasses size" gives 9018
Object allSubclasses size gives 17742
Object class allSubclasses size gives 8864

So there are thousands of classes, right? 9018 I think is the most sensible
answer since it doesn't have the meta-classes.

Steve


Re: [Pharo-users] I feel like an overwhelmed maintenance programmer - how to get some toeholds?

2019-12-18 Thread Steve Davies
On Wed, 18 Dec 2019 at 10:42, Cédrick Béler  wrote:

>
>
> > Le 18 déc. 2019 à 09:37, Sven Van Caekenberghe  a écrit :
> >
> > Here is the class comment of MQTTExperimentalClient, which would be the
> one to use:
> >
>

Thank you Sven and Cédrick for the pointers.  An existing implementation of
MQTT Client is a huge help and of course very useful for my learning.

I didn't know the Filter field could "or" so that is great to make things
disappear.

Thanks for taking the time to show me how to load the code with Metacello.

Steve


[Pharo-users] I feel like an overwhelmed maintenance programmer - how to get some toeholds?

2019-12-18 Thread Steve Davies
Hi,

I'm having yet another go to get to grips with Pharo.

My project is for home automation.  It seems in principle a great match
since object inside Smalltalk are obviously a great match for physical
objects being controlled.

I started at the Pharo Wiki on Github "Setting up a new project".

I'm a career programmer but I'm nearly 60 and sadly I can't absorb
information like I used to be able to, and I'm just finding Pharo so
overwhelming - I feel like a maintenance programmer trying to find a way
into a million lines of code when you don't understand the principles of
organisation and the conventions of the developers.

Is there no way to have some sort of "progressive revelation" of the
insides of Pharo?  Just documentation on most classes, examples of how to
use the class, without the implementation being exposed initially?

The stuff I need to look into for my project is mixed in with 1000s of
classes that I (hopefully) can ignore for now - but there seems to be no
way to hide away all the irrelevant stuff.

Traditionally if I was trying to get to grips with a large unfamiliar code
base I would use grep to search, skim through source files getting a sense
of it.  With the browser in Pharo I feel like I'm looking through a
keyhole.  No doubt this is just unfamiliarity and I just need to learn the
tools better.

Please read this as a request for help as to how to get a finger hold and
how to shake this feeling of drinking from the firehose?  It's not intended
as a complaint.

My first task is to write an MQTTClient.  MQTT is a messaging protocol.
MQTT has "clients" - who subscribe for "topics" and receive matching
messages, and which can publish to topics.  And there are brokers which
distribute published messages to subscribing clients.

I only need to implement a client.  The protocol is binary, not text.  It
runs over TCP.  Here's a description of the messaging

SInce I envision objects inside Pharo that model the real external objects
then I will need some sort of background process running the connection to
the mqtt broker, and each object would receive and send MQTT messages via
that process.

So to tackle this I need to understand:

   1. How to implement a TCP client (subclass ProtocolClient?  Or do I need
   to work at a lower level with SocketStream?)
   2. Packing and unpacking binary data, working with bits.
   3. How to talk to and from a background process.

Any and all suggestions and help to get going would be welcome.  I do
understand the principles of Smalltalk and can read code OK.

Thanks,
Steve